@diegovelasquezweb/a11y-engine 0.7.7 → 0.7.8

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.7.7",
3
+ "version": "0.7.8",
4
4
  "description": "WCAG 2.2 accessibility audit engine — scanner, analyzer, and report builders",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -843,11 +843,7 @@ function buildFindings(inputPayload, cliArgs) {
843
843
 
844
844
  findings.push({
845
845
  id: "",
846
- rule_id: v.source === "cdp"
847
- ? v.id.replace(/^cdp-/, "")
848
- : v.source === "pa11y"
849
- ? `pa11y-${v.id.split(".").pop()?.toLowerCase() ?? v.id.toLowerCase()}`
850
- : v.id,
846
+ rule_id: v.source === "cdp" ? v.id.replace(/^cdp-/, "") : v.id,
851
847
  source_rule_id: v.source_rule_id || null,
852
848
  source: v.source || "axe",
853
849
  title: v.help,
@@ -855,7 +855,7 @@ async function runPa11yChecks(routeUrl, axeTags) {
855
855
  }
856
856
  }
857
857
 
858
- const ruleId = axeEquivId || `pa11y-${(issue.code || "unknown").replace(/\./g, "-").toLowerCase().slice(0, 60)}`;
858
+ const ruleId = axeEquivId || `pa11y-${((issue.code || "unknown").split(".").pop() || "unknown").toLowerCase()}`;
859
859
  const originalCode = issue.code || "unknown";
860
860
 
861
861
  violations.push({