@diegovelasquezweb/a11y-engine 0.11.8 → 0.11.9

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diegovelasquezweb/a11y-engine",
3
- "version": "0.11.8",
3
+ "version": "0.11.9",
4
4
  "description": "WCAG 2.2 accessibility audit engine — scanner, analyzer, and report builders",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1060,22 +1060,18 @@ async function runPa11yChecks(routeUrl, axeTags, sharedBrowser = null, includeWa
1060
1060
  failureSummary: cleanMessage,
1061
1061
  };
1062
1062
 
1063
- if (groupedByRule.has(ruleId)) {
1064
- // Add node to existing violation
1065
- const existing = groupedByRule.get(ruleId);
1066
- existing.nodes.push(node);
1067
- // A confirmed error overrides warning-level needs_verification
1068
- if (!isWarning) {
1069
- existing.needs_verification = false;
1070
- }
1063
+ // Group errors and warnings separately — mixing them loses confirmed findings
1064
+ const groupKey = `${ruleId}::${isWarning ? "warning" : "error"}`;
1065
+
1066
+ if (groupedByRule.has(groupKey)) {
1067
+ groupedByRule.get(groupKey).nodes.push(node);
1071
1068
  } else {
1072
- // Create new violation for this rule
1073
- groupedByRule.set(ruleId, {
1069
+ groupedByRule.set(groupKey, {
1074
1070
  id: ruleId,
1075
1071
  impact,
1076
1072
  tags: ["pa11y-check", ...(wcagCriterion ? [`wcag${wcagCriterion.replace(/\./g, "")}`] : [])],
1077
1073
  description: cleanMessage,
1078
- help: cleanMessage.split(".")[0] || "Accessibility issue detected by HTML CodeSniffer",
1074
+ help: cleanMessage,
1079
1075
  helpUrl: wcagCriterion
1080
1076
  ? `https://www.w3.org/WAI/WCAG21/Understanding/${wcagCriterion.replace(/\./g, "")}`
1081
1077
  : "https://squizlabs.github.io/HTML_CodeSniffer/",