@govtechsg/oobee 0.10.74 → 0.10.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/mergeAxeResults.ts +20 -5
package/package.json
CHANGED
package/src/mergeAxeResults.ts
CHANGED
|
@@ -835,10 +835,24 @@ const writeJsonAndBase64Files = async (
|
|
|
835
835
|
|
|
836
836
|
// Refactor scanIssuesSummary to reuse the scanItemsMiniReport structure by stripping out pagesAffected
|
|
837
837
|
const scanIssuesSummary = {
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
838
|
+
|
|
839
|
+
// Replace rule descriptions with short descriptions from the map
|
|
840
|
+
mustFix: items.mustFix.rules.map(({ pagesAffected, ...ruleInfo }) => ({
|
|
841
|
+
...ruleInfo,
|
|
842
|
+
description: a11yRuleShortDescriptionMap[ruleInfo.rule] || ruleInfo.description,
|
|
843
|
+
})),
|
|
844
|
+
goodToFix: items.goodToFix.rules.map(({ pagesAffected, ...ruleInfo }) => ({
|
|
845
|
+
...ruleInfo,
|
|
846
|
+
description: a11yRuleShortDescriptionMap[ruleInfo.rule] || ruleInfo.description,
|
|
847
|
+
})),
|
|
848
|
+
needsReview: items.needsReview.rules.map(({ pagesAffected, ...ruleInfo }) => ({
|
|
849
|
+
...ruleInfo,
|
|
850
|
+
description: a11yRuleShortDescriptionMap[ruleInfo.rule] || ruleInfo.description,
|
|
851
|
+
})),
|
|
852
|
+
passed: items.passed.rules.map(({ pagesAffected, ...ruleInfo }) => ({
|
|
853
|
+
...ruleInfo,
|
|
854
|
+
description: a11yRuleShortDescriptionMap[ruleInfo.rule] || ruleInfo.description,
|
|
855
|
+
})),
|
|
842
856
|
};
|
|
843
857
|
|
|
844
858
|
// Write out the scanIssuesSummary JSON using the new structure
|
|
@@ -1200,7 +1214,8 @@ const getTopTenIssues = allIssues => {
|
|
|
1200
1214
|
rulesWithCounts.push({
|
|
1201
1215
|
category,
|
|
1202
1216
|
ruleId: rule.rule,
|
|
1203
|
-
description
|
|
1217
|
+
// Replace description with new Oobee short description if available
|
|
1218
|
+
description: a11yRuleShortDescriptionMap[rule.rule] || rule.description,
|
|
1204
1219
|
axeImpact: rule.axeImpact,
|
|
1205
1220
|
conformance: rule.conformance,
|
|
1206
1221
|
totalItems: rule.totalItems,
|