ultra11y 5.14.1 → 5.14.2

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.
@@ -10,7 +10,7 @@
10
10
  "name": "ultra11y",
11
11
  "source": "./",
12
12
  "description": "Automatic accessibility review of the code under change before every commit, push and pull request, plus full WCAG 2.2 AA / RGAA audits and conformance deliverables on demand.",
13
- "version": "5.14.1",
13
+ "version": "5.14.2",
14
14
  "author": { "name": "maxgfr" },
15
15
  "homepage": "https://github.com/maxgfr/ultra11y",
16
16
  "repository": "https://github.com/maxgfr/ultra11y",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ultra11y",
3
3
  "description": "Accessibility for WCAG 2.2 AA and country standards (RGAA…): an automatic review of the code under change before every commit, push and pull request, plus full audits and conformance deliverables on demand.",
4
- "version": "5.14.1",
4
+ "version": "5.14.2",
5
5
  "author": { "name": "maxgfr" },
6
6
  "homepage": "https://github.com/maxgfr/ultra11y",
7
7
  "repository": "https://github.com/maxgfr/ultra11y",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ultra11y",
3
3
  "description": "Accessibility for WCAG 2.2 AA and country standards (RGAA…): an automatic review of the code under change before every commit, push and pull request, plus full audits and conformance deliverables on demand.",
4
- "version": "5.14.1",
4
+ "version": "5.14.2",
5
5
  "author": { "name": "maxgfr", "url": "https://github.com/maxgfr" },
6
6
  "homepage": "https://github.com/maxgfr/ultra11y",
7
7
  "repository": "https://github.com/maxgfr/ultra11y",
@@ -27,7 +27,7 @@ import { fileURLToPath } from "node:url";
27
27
  // Ownership marker: `ultra11y install --opencode` refuses to overwrite a plugin file that
28
28
  // does not carry it, so a user's own ultra11y.js is never clobbered.
29
29
  const ULTRA11Y_OPENCODE_PLUGIN = "ULTRA11Y_OPENCODE_PLUGIN";
30
- const ULTRA11Y_PLUGIN_VERSION = "5.14.1";
30
+ const ULTRA11Y_PLUGIN_VERSION = "5.14.2";
31
31
 
32
32
  const here = dirname(fileURLToPath(import.meta.url));
33
33
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultra11y",
3
- "version": "5.14.1",
3
+ "version": "5.14.2",
4
4
  "description": "Audit HTML/CSS/JSX against WCAG 2.2 AA and produce a dated compliance report, or author/review accessible markup (native-HTML-first). A skills.sh agent skill: an install-free static engine (bundled, no npm install) plus the agent's judgment, with check/verify gates against hallucinated non-conformities, and pluggable in-repo standards packs (RGAA France first; Section 508 & EN 301 549 next).",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@10.33.0",
@@ -6,7 +6,7 @@ import { join as join51, relative as relative5, resolve as resolve16, sep as sep
6
6
  import { fileURLToPath as fileURLToPath5, pathToFileURL as pathToFileURL3 } from "url";
7
7
 
8
8
  // src/types.ts
9
- var VERSION = "5.14.1";
9
+ var VERSION = "5.14.2";
10
10
  var SCHEMA_VERSION = 2;
11
11
  var INAPPLICABLE_STATUS = "C";
12
12
 
@@ -19918,6 +19918,7 @@ function isUrlPath(file) {
19918
19918
  return /^https?:\/\//i.test(file);
19919
19919
  }
19920
19920
  function repoRelative(file, baseDir) {
19921
+ if (typeof file !== "string" || !file) return "";
19921
19922
  const posix3 = file.split("\\").join("/").replace(/^\.\//, "");
19922
19923
  const base = baseDir.split("\\").join("/").replace(/\/+$/, "");
19923
19924
  if (base && posix3.startsWith(`${base}/`)) return posix3.slice(base.length + 1);
@@ -58072,6 +58073,13 @@ function applyAdjudication(audit2, adj, opts = {}) {
58072
58073
  } else if (v === "NC") {
58073
58074
  if (!it.findings || it.findings.length === 0) blame(it.criteriaId, `criterion ${it.criteriaId}: an NC verdict requires at least one groundable finding`);
58074
58075
  for (const f of it.findings ?? []) {
58076
+ if (typeof f.file !== "string" || !f.file.trim()) {
58077
+ blame(
58078
+ it.criteriaId,
58079
+ `criterion ${it.criteriaId}: an NC finding must name the file it was observed in \u2014 nobody can act on a non-conformity with no location`
58080
+ );
58081
+ continue;
58082
+ }
58075
58083
  if (!f.normativeRef || !f.normativeRef.trim()) {
58076
58084
  blame(it.criteriaId, `criterion ${it.criteriaId}: an NC finding requires a normativeRef citing the failed test of the active standard`);
58077
58085
  } else if (!normativeRefResolves(f.normativeRef, adj.standard, isCore(adj.standard) ? void 0 : it.criteriaId)) {
@@ -58088,7 +58096,13 @@ function applyAdjudication(audit2, adj, opts = {}) {
58088
58096
  } else {
58089
58097
  blame(it.criteriaId, `criterion ${it.criteriaId}: unknown verdict "${String(v)}" \u2014 expected one of ${VERDICTS.join(" | ")}`);
58090
58098
  }
58091
- for (const rec of it.recommendations ?? []) toGround(it.criteriaId, { file: rec.file, line: rec.line, selector: rec.selector, snippet: rec.snippet });
58099
+ for (const rec of it.recommendations ?? []) {
58100
+ if (typeof rec.file !== "string" || !rec.file.trim()) {
58101
+ blame(it.criteriaId, `criterion ${it.criteriaId}: a recommendation must name the file it was observed in`);
58102
+ continue;
58103
+ }
58104
+ toGround(it.criteriaId, { file: rec.file, line: rec.line, selector: rec.selector, snippet: rec.snippet });
58105
+ }
58092
58106
  }
58093
58107
  const grounding = { grounded: 0, moved: 0, failed: 0, issues: [] };
58094
58108
  for (const [criteriaId, inputs] of groundInputs) {
@@ -5,7 +5,7 @@ when_to_use: "Invoke WITHOUT being asked whenever changed front-end code should
5
5
  allowed-tools: Bash(node ${CLAUDE_SKILL_DIR}/scripts/ultra11y.mjs *), Read, Grep, Glob
6
6
  license: MIT
7
7
  metadata:
8
- version: 5.14.1
8
+ version: 5.14.2
9
9
  ---
10
10
 
11
11
  # review-a11y — accessibility review of changed code
@@ -6,7 +6,7 @@ import { join as join51, relative as relative5, resolve as resolve16, sep as sep
6
6
  import { fileURLToPath as fileURLToPath5, pathToFileURL as pathToFileURL3 } from "url";
7
7
 
8
8
  // src/types.ts
9
- var VERSION = "5.14.1";
9
+ var VERSION = "5.14.2";
10
10
  var SCHEMA_VERSION = 2;
11
11
  var INAPPLICABLE_STATUS = "C";
12
12
 
@@ -19918,6 +19918,7 @@ function isUrlPath(file) {
19918
19918
  return /^https?:\/\//i.test(file);
19919
19919
  }
19920
19920
  function repoRelative(file, baseDir) {
19921
+ if (typeof file !== "string" || !file) return "";
19921
19922
  const posix3 = file.split("\\").join("/").replace(/^\.\//, "");
19922
19923
  const base = baseDir.split("\\").join("/").replace(/\/+$/, "");
19923
19924
  if (base && posix3.startsWith(`${base}/`)) return posix3.slice(base.length + 1);
@@ -58072,6 +58073,13 @@ function applyAdjudication(audit2, adj, opts = {}) {
58072
58073
  } else if (v === "NC") {
58073
58074
  if (!it.findings || it.findings.length === 0) blame(it.criteriaId, `criterion ${it.criteriaId}: an NC verdict requires at least one groundable finding`);
58074
58075
  for (const f of it.findings ?? []) {
58076
+ if (typeof f.file !== "string" || !f.file.trim()) {
58077
+ blame(
58078
+ it.criteriaId,
58079
+ `criterion ${it.criteriaId}: an NC finding must name the file it was observed in \u2014 nobody can act on a non-conformity with no location`
58080
+ );
58081
+ continue;
58082
+ }
58075
58083
  if (!f.normativeRef || !f.normativeRef.trim()) {
58076
58084
  blame(it.criteriaId, `criterion ${it.criteriaId}: an NC finding requires a normativeRef citing the failed test of the active standard`);
58077
58085
  } else if (!normativeRefResolves(f.normativeRef, adj.standard, isCore(adj.standard) ? void 0 : it.criteriaId)) {
@@ -58088,7 +58096,13 @@ function applyAdjudication(audit2, adj, opts = {}) {
58088
58096
  } else {
58089
58097
  blame(it.criteriaId, `criterion ${it.criteriaId}: unknown verdict "${String(v)}" \u2014 expected one of ${VERDICTS.join(" | ")}`);
58090
58098
  }
58091
- for (const rec of it.recommendations ?? []) toGround(it.criteriaId, { file: rec.file, line: rec.line, selector: rec.selector, snippet: rec.snippet });
58099
+ for (const rec of it.recommendations ?? []) {
58100
+ if (typeof rec.file !== "string" || !rec.file.trim()) {
58101
+ blame(it.criteriaId, `criterion ${it.criteriaId}: a recommendation must name the file it was observed in`);
58102
+ continue;
58103
+ }
58104
+ toGround(it.criteriaId, { file: rec.file, line: rec.line, selector: rec.selector, snippet: rec.snippet });
58105
+ }
58092
58106
  }
58093
58107
  const grounding = { grounded: 0, moved: 0, failed: 0, issues: [] };
58094
58108
  for (const [criteriaId, inputs] of groundInputs) {
@@ -4,7 +4,7 @@ description: "Use to AUDIT existing HTML/CSS/JSX against WCAG 2.2 AA accessibili
4
4
  when_to_use: "Invoke when the user asks for an accessibility AUDIT or a formal deliverable: audit a repo, site or page against WCAG 2.2 AA or a country standard (RGAA, Section 508, EN 301 549); produce a dated conformance report, a criterion grid, a PRD backlog, or tickets (GitHub/GitLab/Jira); author accessible markup from scratch; wire the repo gate (init --hook/--ci) or a rendered-DOM capture pipeline. For a review of the code UNDER CHANGE (diff, branch, PR), use the `review-a11y` skill instead."
5
5
  license: MIT
6
6
  metadata:
7
- version: 5.14.1
7
+ version: 5.14.2
8
8
  ---
9
9
 
10
10
  # ultra11y — audit WCAG 2.2 AA and write accessible markup
@@ -6,7 +6,7 @@ import { join as join51, relative as relative5, resolve as resolve16, sep as sep
6
6
  import { fileURLToPath as fileURLToPath5, pathToFileURL as pathToFileURL3 } from "url";
7
7
 
8
8
  // src/types.ts
9
- var VERSION = "5.14.1";
9
+ var VERSION = "5.14.2";
10
10
  var SCHEMA_VERSION = 2;
11
11
  var INAPPLICABLE_STATUS = "C";
12
12
 
@@ -19918,6 +19918,7 @@ function isUrlPath(file) {
19918
19918
  return /^https?:\/\//i.test(file);
19919
19919
  }
19920
19920
  function repoRelative(file, baseDir) {
19921
+ if (typeof file !== "string" || !file) return "";
19921
19922
  const posix3 = file.split("\\").join("/").replace(/^\.\//, "");
19922
19923
  const base = baseDir.split("\\").join("/").replace(/\/+$/, "");
19923
19924
  if (base && posix3.startsWith(`${base}/`)) return posix3.slice(base.length + 1);
@@ -58072,6 +58073,13 @@ function applyAdjudication(audit2, adj, opts = {}) {
58072
58073
  } else if (v === "NC") {
58073
58074
  if (!it.findings || it.findings.length === 0) blame(it.criteriaId, `criterion ${it.criteriaId}: an NC verdict requires at least one groundable finding`);
58074
58075
  for (const f of it.findings ?? []) {
58076
+ if (typeof f.file !== "string" || !f.file.trim()) {
58077
+ blame(
58078
+ it.criteriaId,
58079
+ `criterion ${it.criteriaId}: an NC finding must name the file it was observed in \u2014 nobody can act on a non-conformity with no location`
58080
+ );
58081
+ continue;
58082
+ }
58075
58083
  if (!f.normativeRef || !f.normativeRef.trim()) {
58076
58084
  blame(it.criteriaId, `criterion ${it.criteriaId}: an NC finding requires a normativeRef citing the failed test of the active standard`);
58077
58085
  } else if (!normativeRefResolves(f.normativeRef, adj.standard, isCore(adj.standard) ? void 0 : it.criteriaId)) {
@@ -58088,7 +58096,13 @@ function applyAdjudication(audit2, adj, opts = {}) {
58088
58096
  } else {
58089
58097
  blame(it.criteriaId, `criterion ${it.criteriaId}: unknown verdict "${String(v)}" \u2014 expected one of ${VERDICTS.join(" | ")}`);
58090
58098
  }
58091
- for (const rec of it.recommendations ?? []) toGround(it.criteriaId, { file: rec.file, line: rec.line, selector: rec.selector, snippet: rec.snippet });
58099
+ for (const rec of it.recommendations ?? []) {
58100
+ if (typeof rec.file !== "string" || !rec.file.trim()) {
58101
+ blame(it.criteriaId, `criterion ${it.criteriaId}: a recommendation must name the file it was observed in`);
58102
+ continue;
58103
+ }
58104
+ toGround(it.criteriaId, { file: rec.file, line: rec.line, selector: rec.selector, snippet: rec.snippet });
58105
+ }
58092
58106
  }
58093
58107
  const grounding = { grounded: 0, moved: 0, failed: 0, issues: [] };
58094
58108
  for (const [criteriaId, inputs] of groundInputs) {
package/src/adjudicate.ts CHANGED
@@ -879,6 +879,18 @@ export function applyAdjudication(
879
879
  } else if (v === "NC") {
880
880
  if (!it.findings || it.findings.length === 0) blame(it.criteriaId, `criterion ${it.criteriaId}: an NC verdict requires at least one groundable finding`);
881
881
  for (const f of it.findings ?? []) {
882
+ // AN NC NOBODY CAN OPEN IS NOT A FINDING. Checked before the normativeRef, because a
883
+ // finding with no file cannot be grounded at all — there is nothing to go and read.
884
+ // Measured once: a model returned an NC with no `file`, the fold minted it anyway, and
885
+ // it reached `repoRelative`, which crashed on `undefined.split` and took SARIF, the
886
+ // annotations, the comment, the report, the HTML and the artifact upload with it.
887
+ if (typeof f.file !== "string" || !f.file.trim()) {
888
+ blame(
889
+ it.criteriaId,
890
+ `criterion ${it.criteriaId}: an NC finding must name the file it was observed in — nobody can act on a non-conformity with no location`,
891
+ );
892
+ continue;
893
+ }
882
894
  // FAIL-CLOSED: every NC finding must cite a precise, resolvable test of the active
883
895
  // standard. A good practice with no normative test is a recommendation, not an NC.
884
896
  if (!f.normativeRef || !f.normativeRef.trim()) {
@@ -905,7 +917,15 @@ export function applyAdjudication(
905
917
  // Recommendations are independent of the verdict (a C criterion may still carry a good
906
918
  // practice) and are grounded exactly like an NC finding — no normativeRef required, as
907
919
  // a recommendation has no normative test by definition.
908
- for (const rec of it.recommendations ?? []) toGround(it.criteriaId, { file: rec.file, line: rec.line, selector: rec.selector, snippet: rec.snippet });
920
+ for (const rec of it.recommendations ?? []) {
921
+ // Same contract, same reason: a recommendation is rendered through the very surfaces an
922
+ // NC is, so one with no location breaks them just as thoroughly.
923
+ if (typeof rec.file !== "string" || !rec.file.trim()) {
924
+ blame(it.criteriaId, `criterion ${it.criteriaId}: a recommendation must name the file it was observed in`);
925
+ continue;
926
+ }
927
+ toGround(it.criteriaId, { file: rec.file, line: rec.line, selector: rec.selector, snippet: rec.snippet });
928
+ }
909
929
  }
910
930
 
911
931
  // Content-level grounding of every agent NC finding, every C/NA citation, and every
package/src/types.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // Single source of truth for shared types + the embedded version. sync-version.mjs
2
2
  // rewrites VERSION at release time (kept in lockstep with package.json + SKILL.md).
3
- export const VERSION = "5.14.1";
3
+ export const VERSION = "5.14.2";
4
4
  export const SCHEMA_VERSION = 2;
5
5
 
6
6
  // Lang = the UI FRAME's language — the `L` localization tables each module (report,
package/src/util.ts CHANGED
@@ -36,6 +36,13 @@ export function isUrlPath(file: string): boolean {
36
36
  * under `baseDir`; leave it as-is when it does not, rather than inventing a path that
37
37
  * resolves nowhere. */
38
38
  export function repoRelative(file: string, baseDir: string): string {
39
+ // A finding with no file at all. It should never reach here — the adjudication fold refuses
40
+ // an NC that names none — but an AuditResult can also be hand-written or produced by an
41
+ // external tool's adapter, and neither goes through that gate. Measured once: one such
42
+ // finding threw here and took SARIF, the annotations, the pull-request comment, the report,
43
+ // the HTML and the artifact upload with it, because every one of those steps runs after.
44
+ // A rendering surface that explodes on bad input tells its reader nothing at all.
45
+ if (typeof file !== "string" || !file) return "";
39
46
  const posix = file.split("\\").join("/").replace(/^\.\//, "");
40
47
  const base = baseDir.split("\\").join("/").replace(/\/+$/, "");
41
48
  if (base && posix.startsWith(`${base}/`)) return posix.slice(base.length + 1);