ultra11y 5.51.1 → 5.51.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": "RGAA 4.1.2 accessibility audits on a WCAG 2.2 AA core: automatic review before commit, push and pull request, plus dated, evidenced Markdown, HTML and per-page conformance reports in Claude Code.",
13
- "version": "5.51.1",
13
+ "version": "5.51.2",
14
14
  "author": { "name": "maxgfr" },
15
15
  "homepage": "https://github.com/SocialGouv/ultra11y",
16
16
  "repository": "https://github.com/SocialGouv/ultra11y",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ultra11y",
3
3
  "description": "RGAA 4.1.2 accessibility audits, the French State's standard, on a WCAG 2.2 AA core: automatic review before commit, push and pull request, plus dated, evidenced Markdown, HTML and per-page conformance reports. Never declares conforming what it has not verified.",
4
- "version": "5.51.1",
4
+ "version": "5.51.2",
5
5
  "author": { "name": "maxgfr" },
6
6
  "homepage": "https://github.com/SocialGouv/ultra11y",
7
7
  "repository": "https://github.com/SocialGouv/ultra11y",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ultra11y",
3
3
  "description": "RGAA 4.1.2 accessibility audits, the French State's standard, on a WCAG 2.2 AA core: automatic review before commit, push and pull request, plus dated, evidenced Markdown, HTML and per-page conformance reports. Never declares conforming what it has not verified.",
4
- "version": "5.51.1",
4
+ "version": "5.51.2",
5
5
  "author": { "name": "maxgfr", "url": "https://github.com/maxgfr" },
6
6
  "homepage": "https://github.com/SocialGouv/ultra11y",
7
7
  "repository": "https://github.com/SocialGouv/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.51.1";
30
+ const ULTRA11Y_PLUGIN_VERSION = "5.51.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.51.1",
3
+ "version": "5.51.2",
4
4
  "description": "Audit d'accessibilité RGAA 4.1.2, le référentiel de l'État : rapport daté, grille des 106 critères, backlog et tickets. Moteur statique, navigateur et jugement IA contre-vérifié. Il ne déclare jamais conforme ce qu'il n'a pas vérifié. Socle WCAG 2.2 AA.",
5
5
  "homepage": "https://socialgouv.github.io/ultra11y/",
6
6
  "type": "module",
@@ -6,7 +6,7 @@ import { join as join53, relative as relative6, resolve as resolve18, 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.51.1";
9
+ var VERSION = "5.51.2";
10
10
  var SCHEMA_VERSION = 2;
11
11
  var INAPPLICABLE_STATUS = "C";
12
12
 
@@ -49872,6 +49872,11 @@ function visuallyRenderedText(el) {
49872
49872
  for (const child of el.children) walk3(child);
49873
49873
  return collapse(out2);
49874
49874
  }
49875
+ function labelledbyIsDynamic(el) {
49876
+ const literal = attr(el, "aria-labelledby");
49877
+ if (literal === void 0) return hasBoundAttr(el, "aria-labelledby");
49878
+ return literal.includes("{");
49879
+ }
49875
49880
  function ariaLabelledbyText(el, doc) {
49876
49881
  const ids2 = attr(el, "aria-labelledby");
49877
49882
  if (!ids2) return "";
@@ -49886,7 +49891,7 @@ var NAMELESS_BY_DEFAULT = /* @__PURE__ */ new Set(["submit", "reset"]);
49886
49891
  function accessibleName(el, doc) {
49887
49892
  const labelledby = ariaLabelledbyText(el, doc);
49888
49893
  if (labelledby) return labelledby;
49889
- if (hasBoundAttr(el, "aria-labelledby") && !attr(el, "aria-labelledby")) return "\xA0";
49894
+ if (labelledbyIsDynamic(el)) return "\xA0";
49890
49895
  const ariaLabel = (boundAttr(el, "aria-label") ?? "").trim();
49891
49896
  if (ariaLabel) return ariaLabel;
49892
49897
  if (el.tag === "img" || el.tag === "area") {
@@ -49918,8 +49923,7 @@ function isFormField2(el) {
49918
49923
  return true;
49919
49924
  }
49920
49925
  function controlLabel(el, doc) {
49921
- if (attr(el, "aria-labelledby") && ariaLabelledbyText(el, doc) || hasBoundAttr(el, "aria-labelledby") && !attr(el, "aria-labelledby"))
49922
- return { hasLabel: true, via: "aria-labelledby" };
49926
+ if (attr(el, "aria-labelledby") && ariaLabelledbyText(el, doc) || labelledbyIsDynamic(el)) return { hasLabel: true, via: "aria-labelledby" };
49923
49927
  if ((boundAttr(el, "aria-label") ?? "").trim()) return { hasLabel: true, via: "aria-label" };
49924
49928
  const id = attr(el, "id");
49925
49929
  if (id) {
@@ -52176,6 +52180,7 @@ var controlLabelMissing = {
52176
52180
  if (via === "title") continue;
52177
52181
  if (hasDynamicSpread(el)) continue;
52178
52182
  if (hasAttr(el, "placeholder")) continue;
52183
+ if ((attr(el, "id") ?? "").includes("{")) continue;
52179
52184
  out2.push({
52180
52185
  criteriaId: "4.1.2",
52181
52186
  el,
@@ -3,7 +3,7 @@ name: review-a11y
3
3
  description: "Use to REVIEW changed frontend code for accessibility: staged files, a working diff, branch, or PR; prompts such as 'review a11y', 'is this accessible?', or 'anything to fix before merge?'; and hook or CI findings on a change. Run the bundled install-free engine with cross-file JSX/TSX analysis, then adjudicate candidates and return a severity-ranked WCAG 2.2 AA review with file:line fixes, residual rendering risks, and a verdict. Use `ultra11y` instead for whole-repo audits, dated conformance reports, country standards, PRD backlogs, or authoring accessible markup."
4
4
  license: MIT
5
5
  metadata:
6
- version: 5.51.1
6
+ version: 5.51.2
7
7
  ---
8
8
 
9
9
  # review-a11y — accessibility review of changed code
@@ -6,7 +6,7 @@ import { join as join53, relative as relative6, resolve as resolve18, 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.51.1";
9
+ var VERSION = "5.51.2";
10
10
  var SCHEMA_VERSION = 2;
11
11
  var INAPPLICABLE_STATUS = "C";
12
12
 
@@ -49872,6 +49872,11 @@ function visuallyRenderedText(el) {
49872
49872
  for (const child of el.children) walk3(child);
49873
49873
  return collapse(out2);
49874
49874
  }
49875
+ function labelledbyIsDynamic(el) {
49876
+ const literal = attr(el, "aria-labelledby");
49877
+ if (literal === void 0) return hasBoundAttr(el, "aria-labelledby");
49878
+ return literal.includes("{");
49879
+ }
49875
49880
  function ariaLabelledbyText(el, doc) {
49876
49881
  const ids2 = attr(el, "aria-labelledby");
49877
49882
  if (!ids2) return "";
@@ -49886,7 +49891,7 @@ var NAMELESS_BY_DEFAULT = /* @__PURE__ */ new Set(["submit", "reset"]);
49886
49891
  function accessibleName(el, doc) {
49887
49892
  const labelledby = ariaLabelledbyText(el, doc);
49888
49893
  if (labelledby) return labelledby;
49889
- if (hasBoundAttr(el, "aria-labelledby") && !attr(el, "aria-labelledby")) return "\xA0";
49894
+ if (labelledbyIsDynamic(el)) return "\xA0";
49890
49895
  const ariaLabel = (boundAttr(el, "aria-label") ?? "").trim();
49891
49896
  if (ariaLabel) return ariaLabel;
49892
49897
  if (el.tag === "img" || el.tag === "area") {
@@ -49918,8 +49923,7 @@ function isFormField2(el) {
49918
49923
  return true;
49919
49924
  }
49920
49925
  function controlLabel(el, doc) {
49921
- if (attr(el, "aria-labelledby") && ariaLabelledbyText(el, doc) || hasBoundAttr(el, "aria-labelledby") && !attr(el, "aria-labelledby"))
49922
- return { hasLabel: true, via: "aria-labelledby" };
49926
+ if (attr(el, "aria-labelledby") && ariaLabelledbyText(el, doc) || labelledbyIsDynamic(el)) return { hasLabel: true, via: "aria-labelledby" };
49923
49927
  if ((boundAttr(el, "aria-label") ?? "").trim()) return { hasLabel: true, via: "aria-label" };
49924
49928
  const id = attr(el, "id");
49925
49929
  if (id) {
@@ -52176,6 +52180,7 @@ var controlLabelMissing = {
52176
52180
  if (via === "title") continue;
52177
52181
  if (hasDynamicSpread(el)) continue;
52178
52182
  if (hasAttr(el, "placeholder")) continue;
52183
+ if ((attr(el, "id") ?? "").includes("{")) continue;
52179
52184
  out2.push({
52180
52185
  criteriaId: "4.1.2",
52181
52186
  el,
@@ -3,7 +3,7 @@ name: ultra11y
3
3
  description: "Use to AUDIT a site, repository, or page against RGAA 4.1.2, the French State's accessibility standard (référentiel de l'État), on a WCAG 2.2 AA core (other country standards as packs); produce a dated conformance report, criterion grid, PRD backlog, or tickets; AUTHOR accessible markup; fix accessibility; or wire a repo gate and rendered-DOM capture pipeline. The bundled install-free engine runs 96 static checks tied to success criteria, while the agent adjudicates judgment criteria and routes rendering criteria to browser scans; check/verify reject invented non-conformities and never declare conforming what was not verified. Use `review-a11y` instead for a review scoped only to a diff, branch, or PR."
4
4
  license: MIT
5
5
  metadata:
6
- version: 5.51.1
6
+ version: 5.51.2
7
7
  ---
8
8
 
9
9
  # ultra11y — audit WCAG 2.2 AA and write accessible markup
@@ -6,7 +6,7 @@ import { join as join53, relative as relative6, resolve as resolve18, 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.51.1";
9
+ var VERSION = "5.51.2";
10
10
  var SCHEMA_VERSION = 2;
11
11
  var INAPPLICABLE_STATUS = "C";
12
12
 
@@ -49872,6 +49872,11 @@ function visuallyRenderedText(el) {
49872
49872
  for (const child of el.children) walk3(child);
49873
49873
  return collapse(out2);
49874
49874
  }
49875
+ function labelledbyIsDynamic(el) {
49876
+ const literal = attr(el, "aria-labelledby");
49877
+ if (literal === void 0) return hasBoundAttr(el, "aria-labelledby");
49878
+ return literal.includes("{");
49879
+ }
49875
49880
  function ariaLabelledbyText(el, doc) {
49876
49881
  const ids2 = attr(el, "aria-labelledby");
49877
49882
  if (!ids2) return "";
@@ -49886,7 +49891,7 @@ var NAMELESS_BY_DEFAULT = /* @__PURE__ */ new Set(["submit", "reset"]);
49886
49891
  function accessibleName(el, doc) {
49887
49892
  const labelledby = ariaLabelledbyText(el, doc);
49888
49893
  if (labelledby) return labelledby;
49889
- if (hasBoundAttr(el, "aria-labelledby") && !attr(el, "aria-labelledby")) return "\xA0";
49894
+ if (labelledbyIsDynamic(el)) return "\xA0";
49890
49895
  const ariaLabel = (boundAttr(el, "aria-label") ?? "").trim();
49891
49896
  if (ariaLabel) return ariaLabel;
49892
49897
  if (el.tag === "img" || el.tag === "area") {
@@ -49918,8 +49923,7 @@ function isFormField2(el) {
49918
49923
  return true;
49919
49924
  }
49920
49925
  function controlLabel(el, doc) {
49921
- if (attr(el, "aria-labelledby") && ariaLabelledbyText(el, doc) || hasBoundAttr(el, "aria-labelledby") && !attr(el, "aria-labelledby"))
49922
- return { hasLabel: true, via: "aria-labelledby" };
49926
+ if (attr(el, "aria-labelledby") && ariaLabelledbyText(el, doc) || labelledbyIsDynamic(el)) return { hasLabel: true, via: "aria-labelledby" };
49923
49927
  if ((boundAttr(el, "aria-label") ?? "").trim()) return { hasLabel: true, via: "aria-label" };
49924
49928
  const id = attr(el, "id");
49925
49929
  if (id) {
@@ -52176,6 +52180,7 @@ var controlLabelMissing = {
52176
52180
  if (via === "title") continue;
52177
52181
  if (hasDynamicSpread(el)) continue;
52178
52182
  if (hasAttr(el, "placeholder")) continue;
52183
+ if ((attr(el, "id") ?? "").includes("{")) continue;
52179
52184
  out2.push({
52180
52185
  criteriaId: "4.1.2",
52181
52186
  el,
@@ -27,7 +27,7 @@ variables:
27
27
  ULTRA11Y_LANG: en
28
28
  # Exact by default: a CI report must say which engine produced it. The release script keeps
29
29
  # this pin aligned with the package version; override only for a deliberate upgrade test.
30
- ULTRA11Y_VERSION: '5.51.1'
30
+ ULTRA11Y_VERSION: '5.51.2'
31
31
  # Batches of 8 amortise the prompt; each accepted verdict is checkpointed before the next
32
32
  # batch, and later passes receive only the residue.
33
33
  ULTRA11Y_GRAIN: batch
package/src/name.ts CHANGED
@@ -239,6 +239,17 @@ export function visuallyRenderedText(el: El): string {
239
239
  return collapse(out);
240
240
  }
241
241
 
242
+ /** An aria-labelledby whose value the parse cannot know: a framework binding
243
+ * (`:aria-labelledby`, `v-bind:`, where the literal attribute is absent) or a JSX expression
244
+ * (`aria-labelledby={labelId}`, serialised with its braces). It names the element — the ids
245
+ * are just not resolvable here — so it must never be read as the literal id `{labelId}` and
246
+ * reported dangling (#94). Same treatment `aria-label={x}` has always had. */
247
+ export function labelledbyIsDynamic(el: El): boolean {
248
+ const literal = attr(el, "aria-labelledby");
249
+ if (literal === undefined) return hasBoundAttr(el, "aria-labelledby");
250
+ return literal.includes("{");
251
+ }
252
+
242
253
  function ariaLabelledbyText(el: El, doc: Doc): string {
243
254
  const ids = attr(el, "aria-labelledby");
244
255
  if (!ids) return "";
@@ -258,7 +269,7 @@ export function accessibleName(el: El, doc: Doc): string {
258
269
  // names the element — treat as present so we don't hallucinate a missing name)
259
270
  const labelledby = ariaLabelledbyText(el, doc);
260
271
  if (labelledby) return labelledby;
261
- if (hasBoundAttr(el, "aria-labelledby") && !attr(el, "aria-labelledby")) return " ";
272
+ if (labelledbyIsDynamic(el)) return " ";
262
273
  // 2. aria-label (incl. dynamic `:aria-label`/`v-bind:` binding → value unknown but present)
263
274
  const ariaLabel = (boundAttr(el, "aria-label") ?? "").trim();
264
275
  if (ariaLabel) return ariaLabel;
@@ -306,8 +317,7 @@ export function controlLabel(el: El, doc: Doc): LabelInfo {
306
317
  // Mirror accessibleName's guard: a labelledby is a real label only when it resolves to
307
318
  // text, OR is a DYNAMIC binding (present but value unknown). A literal aria-labelledby
308
319
  // whose target is missing/empty names nothing — the field is effectively unlabeled.
309
- if ((attr(el, "aria-labelledby") && ariaLabelledbyText(el, doc)) || (hasBoundAttr(el, "aria-labelledby") && !attr(el, "aria-labelledby")))
310
- return { hasLabel: true, via: "aria-labelledby" };
320
+ if ((attr(el, "aria-labelledby") && ariaLabelledbyText(el, doc)) || labelledbyIsDynamic(el)) return { hasLabel: true, via: "aria-labelledby" };
311
321
  if ((boundAttr(el, "aria-label") ?? "").trim()) return { hasLabel: true, via: "aria-label" };
312
322
  const id = attr(el, "id");
313
323
  if (id) {
@@ -62,6 +62,11 @@ const controlLabelMissing: Rule = {
62
62
  // aria-label/aria-labelledby we can't see — don't assert a missing label.
63
63
  if (hasDynamicSpread(el)) continue;
64
64
  if (hasAttr(el, "placeholder")) continue; // reported by placeholder-as-label
65
+ // An id the CALLER supplies (`id={inputId}`) can be targeted by any `<label htmlFor>` the
66
+ // caller renders: the shared-component pattern. Nothing in this document can prove the
67
+ // field unlabelled, and a blocking NC on it is a guess (#94). The rendered tier, where
68
+ // ids are resolved, decides — `axe:label` and this very rule on the page snapshots.
69
+ if ((attr(el, "id") ?? "").includes("{")) continue;
65
70
  out.push({
66
71
  criteriaId: "4.1.2",
67
72
  el,
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.51.1";
3
+ export const VERSION = "5.51.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,