@diegovelasquezweb/a11y-engine 0.11.30 → 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.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diegovelasquezweb/a11y-engine",
3
- "version": "0.11.30",
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",
@@ -32,9 +32,6 @@
32
32
  "CHANGELOG.md",
33
33
  "LICENSE"
34
34
  ],
35
- "scripts": {
36
- "test": "vitest run"
37
- },
38
35
  "dependencies": {
39
36
  "@axe-core/playwright": "^4.11.1",
40
37
  "axe-core": "^4.11.1",
@@ -44,5 +41,7 @@
44
41
  "devDependencies": {
45
42
  "vitest": "^4.0.18"
46
43
  },
47
- "packageManager": "pnpm@10.22.0+sha512.bf049efe995b28f527fd2b41ae0474ce29186f7edcb3bf545087bd61fbbebb2bf75362d1307fda09c2d288e1e499787ac12d4fcb617a974718a6051f2eee741c"
48
- }
44
+ "scripts": {
45
+ "test": "vitest run"
46
+ }
47
+ }
File without changes
@@ -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",
@@ -608,8 +608,15 @@ async function analyzeRoute(
608
608
  const rules = onlyRule.includes(",")
609
609
  ? onlyRule.split(",").map((r) => r.trim()).filter(Boolean)
610
610
  : [onlyRule];
611
- log.info(`Targeted Audit: Only checking rules "${rules.join(", ")}"`);
612
- builder.withRules(rules);
611
+ const axeRules = rules.filter(
612
+ (r) => !r.startsWith("pa11y-") && !r.startsWith("WCAG") && !r.includes(".") && r !== "missing-skip-link",
613
+ );
614
+ log.info(`Targeted Audit: Only checking rules "${rules.join(", ")}" (axe-valid: ${axeRules.join(", ") || "none"})`);
615
+ if (axeRules.length > 0) {
616
+ builder.withRules(axeRules);
617
+ } else {
618
+ builder.withTags(axeTags || AXE_TAGS);
619
+ }
613
620
  } else {
614
621
  const tagsToUse = axeTags || AXE_TAGS;
615
622
  builder.withTags(tagsToUse);
File without changes