@diegovelasquezweb/a11y-engine 0.11.31 → 0.11.32

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.31",
3
+ "version": "0.11.32",
4
4
  "description": "WCAG 2.2 accessibility audit engine — scanner, analyzer, and report builders",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -90,7 +90,7 @@ function getFindings(input) {
90
90
 
91
91
  function getIntelligenceForRule(ruleId) {
92
92
  const rules = ASSETS.remediation.intelligence?.rules || {};
93
- return isObject(rules[ruleId]) ? rules[ruleId] : {};
93
+ return isObject(rules[ruleId]) ? rules[ruleId] : isObject(rules[`cdp-${ruleId}`]) ? rules[`cdp-${ruleId}`] : {};
94
94
  }
95
95
 
96
96
  function listFilesRecursive(dir) {
@@ -183,7 +183,11 @@ function getCandidateFiles(projectDir, finding) {
183
183
  }
184
184
 
185
185
  function buildExecution(ruleId, intelligenceRule, finding) {
186
- const ruleVerify = finding.rule_id || ruleId || "";
186
+ const raw = finding.rule_id || ruleId || "";
187
+ const axeEquivalent = intelligenceRule.related_rules?.find((r) =>
188
+ r.reason?.toLowerCase().includes("axe"),
189
+ )?.id;
190
+ const ruleVerify = axeEquivalent || raw;
187
191
  const route = normalizeRoute(finding.area);
188
192
  return {
189
193
  strategy: "ai-dom-patch",