@diegovelasquezweb/a11y-engine 0.7.7 → 0.7.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.7.7",
3
+ "version": "0.7.9",
4
4
  "description": "WCAG 2.2 accessibility audit engine — scanner, analyzer, and report builders",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/ai/claude.mjs CHANGED
@@ -13,7 +13,7 @@
13
13
  */
14
14
 
15
15
  const ANTHROPIC_API = "https://api.anthropic.com/v1/messages";
16
- const DEFAULT_MODEL = "claude-sonnet-4-5";
16
+ const DEFAULT_MODEL = "claude-haiku-4-5-20251001";
17
17
  const MAX_AI_FINDINGS = 20; // cap to control cost
18
18
 
19
19
  /**
@@ -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({