ultra11y 5.11.1 → 5.11.3

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.11.1",
13
+ "version": "5.11.3",
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.11.1",
4
+ "version": "5.11.3",
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.11.1",
4
+ "version": "5.11.3",
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.11.1";
30
+ const ULTRA11Y_PLUGIN_VERSION = "5.11.3";
31
31
 
32
32
  const here = dirname(fileURLToPath(import.meta.url));
33
33
 
package/dist/cypress.mjs CHANGED
@@ -166,6 +166,16 @@ function buildPayload(collected, url, runner, opts, screenshot, probes) {
166
166
  runner,
167
167
  viewport: collected.viewport,
168
168
  capturedAt: (/* @__PURE__ */ new Date()).toISOString(),
169
+ // `documentElement.outerHTML` starts at `<html>`, so the DOM alone drops the doctype and
170
+ // RGAA 8.1 — « chaque page web est-elle définie par un type de document ? » — has nothing
171
+ // to look at. The collector captures it separately; this is where it was being thrown
172
+ // away one step later. Measured: 105 of 106 criteria decided, and the one left was 8.1,
173
+ // whose brief read « this capture predates doctype recording ».
174
+ //
175
+ // `!== undefined`, never a truthiness test: an EMPTY doctype is a page that genuinely has
176
+ // none, which is the non-conformity itself. Collapsing it into "not recorded" would hide
177
+ // a failing page behind « à évaluer ».
178
+ ...collected.doctype !== void 0 ? { doctype: collected.doctype } : {},
169
179
  ...opts.auth !== void 0 ? { auth: opts.auth } : {},
170
180
  ...opts.sources ? { sources: opts.sources } : {},
171
181
  ...opts.notes ? { notes: opts.notes } : {}
@@ -500,6 +500,16 @@ function buildPayload(collected, url, runner, opts, screenshot, probes) {
500
500
  runner,
501
501
  viewport: collected.viewport,
502
502
  capturedAt: (/* @__PURE__ */ new Date()).toISOString(),
503
+ // `documentElement.outerHTML` starts at `<html>`, so the DOM alone drops the doctype and
504
+ // RGAA 8.1 — « chaque page web est-elle définie par un type de document ? » — has nothing
505
+ // to look at. The collector captures it separately; this is where it was being thrown
506
+ // away one step later. Measured: 105 of 106 criteria decided, and the one left was 8.1,
507
+ // whose brief read « this capture predates doctype recording ».
508
+ //
509
+ // `!== undefined`, never a truthiness test: an EMPTY doctype is a page that genuinely has
510
+ // none, which is the non-conformity itself. Collapsing it into "not recorded" would hide
511
+ // a failing page behind « à évaluer ».
512
+ ...collected.doctype !== void 0 ? { doctype: collected.doctype } : {},
503
513
  ...opts.auth !== void 0 ? { auth: opts.auth } : {},
504
514
  ...opts.sources ? { sources: opts.sources } : {},
505
515
  ...opts.notes ? { notes: opts.notes } : {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultra11y",
3
- "version": "5.11.1",
3
+ "version": "5.11.3",
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.11.1";
9
+ var VERSION = "5.11.3";
10
10
  var SCHEMA_VERSION = 2;
11
11
 
12
12
  // src/audit.ts
@@ -2289,7 +2289,7 @@ var wcag_universe_default = {
2289
2289
  wcagVersion: "2.2",
2290
2290
  source: "https://www.w3.org/TR/WCAG22/",
2291
2291
  criteriaSource: "https://github.com/w3c/wcag",
2292
- provenance: "Full WCAG 2.x SC universe (all levels incl. AAA, and the removed 4.1.1 Parsing) fetched from raw.githubusercontent.com/w3c/wcag@main on 2026-08-18 via `node scripts/build-standards.mjs --refresh-universe`. Classification: core-AA = ships in src/data/wcag.json (the shipped WCAG 2.2 AA core); out-of-core = WCAG AAA; removed = obsolete (4.1.1).",
2292
+ provenance: "Full WCAG 2.x SC universe (all levels incl. AAA, and the removed 4.1.1 Parsing) fetched from raw.githubusercontent.com/w3c/wcag@main on 2026-08-19 via `node scripts/build-standards.mjs --refresh-universe`. Classification: core-AA = ships in src/data/wcag.json (the shipped WCAG 2.2 AA core); out-of-core = WCAG AAA; removed = obsolete (4.1.1).",
2293
2293
  criteria: [
2294
2294
  {
2295
2295
  id: "1.1.1",
@@ -57953,11 +57953,20 @@ function applyAdjudication(audit2, adj, opts = {}) {
57953
57953
  decidedBy: "agent"
57954
57954
  });
57955
57955
  }
57956
+ const alreadyDecided = new Set(
57957
+ audit2.packAdjudication?.standard === adj.standard ? audit2.packAdjudication.criteria.filter((c2) => c2.status !== "manual").map((c2) => c2.id) : []
57958
+ );
57956
57959
  for (const id of notFolded) {
57957
57960
  if (byId2.has(id) || !open.has(id)) continue;
57961
+ if (alreadyDecided.has(id)) continue;
57958
57962
  decided.push({ id, status: "manual", reason: "undecidable", justification: rejectedWhy(id), findings: [] });
57959
57963
  }
57960
- next.packAdjudication = { standard: adj.standard, criteria: decided };
57964
+ const carried = /* @__PURE__ */ new Map();
57965
+ if (audit2.packAdjudication?.standard === adj.standard) {
57966
+ for (const c2 of audit2.packAdjudication.criteria) carried.set(c2.id, c2);
57967
+ }
57968
+ for (const c2 of decided) carried.set(c2.id, c2);
57969
+ next.packAdjudication = { standard: adj.standard, criteria: [...carried.values()] };
57961
57970
  next.findings = [...next.findings, ...newFindings];
57962
57971
  next.adjudicated = { date: adj.auditDate, applied, stillManual, ...rejectedCriteria.length ? { rejected: rejectedCriteria.length } : {} };
57963
57972
  return { ok: issues.length === 0, audit: next, issues, applied, stillManual, rejected: rejectedCriteria.length, rejectedCriteria, grounding };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "source": "https://www.w3.org/Translations/WCAG22-fr/",
3
- "fetchedAt": "2026-08-18",
3
+ "fetchedAt": "2026-08-19",
4
4
  "principles": {
5
5
  "1": "Perceptible",
6
6
  "2": "Utilisable",
@@ -2,7 +2,7 @@
2
2
  "wcagVersion": "2.2",
3
3
  "source": "https://www.w3.org/TR/WCAG22/",
4
4
  "criteriaSource": "https://github.com/w3c/wcag",
5
- "provenance": "Full WCAG 2.x SC universe (all levels incl. AAA, and the removed 4.1.1 Parsing) fetched from raw.githubusercontent.com/w3c/wcag@main on 2026-08-18 via `node scripts/build-standards.mjs --refresh-universe`. Classification: core-AA = ships in src/data/wcag.json (the shipped WCAG 2.2 AA core); out-of-core = WCAG AAA; removed = obsolete (4.1.1).",
5
+ "provenance": "Full WCAG 2.x SC universe (all levels incl. AAA, and the removed 4.1.1 Parsing) fetched from raw.githubusercontent.com/w3c/wcag@main on 2026-08-19 via `node scripts/build-standards.mjs --refresh-universe`. Classification: core-AA = ships in src/data/wcag.json (the shipped WCAG 2.2 AA core); out-of-core = WCAG AAA; removed = obsolete (4.1.1).",
6
6
  "principles": [
7
7
  {
8
8
  "number": 1,
@@ -2,7 +2,7 @@
2
2
  "source": "https://github.com/w3c/wcag",
3
3
  "understanding": "https://www.w3.org/WAI/WCAG22/Understanding/",
4
4
  "license": "W3C Document License (code samples: W3C Software License)",
5
- "fetchedAt": "2026-08-18",
5
+ "fetchedAt": "2026-08-19",
6
6
  "criteria": {
7
7
  "1.1.1": {
8
8
  "slug": "non-text-content",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "source": "https://github.com/w3c/wcag",
3
3
  "license": "W3C Document License",
4
- "fetchedAt": "2026-08-18",
4
+ "fetchedAt": "2026-08-19",
5
5
  "criteria": {
6
6
  "1.1.1": "All non-text content that is presented to the user has a text alternative that serves the equivalent purpose, except for the situations listed below.\nControls, Input:\nIf non-text content is a control or accepts user input, then it has a name that describes its purpose. (Refer to Success Criterion 4.1.2 Name, Role, Value for additional requirements for controls and content that accepts user input.)\nTime-Based Media:\nIf non-text content is time-based media, then text alternatives at least provide descriptive identification of the non-text content. (Refer to Guideline 1.2 for additional requirements for media.)\nTest:\nIf non-text content is a test or exercise that would be invalid if presented in text, then text alternatives at least provide descriptive identification of the non-text content.\nSensory:\nIf non-text content is primarily intended to create a specific sensory experience, then text alternatives at least provide descriptive identification of the non-text content.\nCAPTCHA:\nIf the purpose of non-text content is to confirm that content is being accessed by a person rather than a computer, then text alternatives that identify and describe the purpose of the non-text content are provided, and alternative forms of CAPTCHA using output modes for different types of sensory perception are provided to accommodate different disabilities.\nDecoration, Formatting, Invisible:\nIf non-text content is pure decoration, is used only for visual formatting, or is not presented to users, then it is implemented in a way that it can be ignored by assistive technology.",
7
7
  "1.2.1": "For prerecorded audio-only and prerecorded video-only media, the following are true, except when the audio or video is a media alternative for text and is clearly labeled as such:\nPrerecorded Audio-only:\nAn alternative for time-based media is provided that presents equivalent information for prerecorded audio-only content.\nPrerecorded Video-only:\nEither an alternative for time-based media or an audio track is provided that presents equivalent information for prerecorded video-only content.",
@@ -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.11.1
8
+ version: 5.11.3
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.11.1";
9
+ var VERSION = "5.11.3";
10
10
  var SCHEMA_VERSION = 2;
11
11
 
12
12
  // src/audit.ts
@@ -2289,7 +2289,7 @@ var wcag_universe_default = {
2289
2289
  wcagVersion: "2.2",
2290
2290
  source: "https://www.w3.org/TR/WCAG22/",
2291
2291
  criteriaSource: "https://github.com/w3c/wcag",
2292
- provenance: "Full WCAG 2.x SC universe (all levels incl. AAA, and the removed 4.1.1 Parsing) fetched from raw.githubusercontent.com/w3c/wcag@main on 2026-08-18 via `node scripts/build-standards.mjs --refresh-universe`. Classification: core-AA = ships in src/data/wcag.json (the shipped WCAG 2.2 AA core); out-of-core = WCAG AAA; removed = obsolete (4.1.1).",
2292
+ provenance: "Full WCAG 2.x SC universe (all levels incl. AAA, and the removed 4.1.1 Parsing) fetched from raw.githubusercontent.com/w3c/wcag@main on 2026-08-19 via `node scripts/build-standards.mjs --refresh-universe`. Classification: core-AA = ships in src/data/wcag.json (the shipped WCAG 2.2 AA core); out-of-core = WCAG AAA; removed = obsolete (4.1.1).",
2293
2293
  criteria: [
2294
2294
  {
2295
2295
  id: "1.1.1",
@@ -57953,11 +57953,20 @@ function applyAdjudication(audit2, adj, opts = {}) {
57953
57953
  decidedBy: "agent"
57954
57954
  });
57955
57955
  }
57956
+ const alreadyDecided = new Set(
57957
+ audit2.packAdjudication?.standard === adj.standard ? audit2.packAdjudication.criteria.filter((c2) => c2.status !== "manual").map((c2) => c2.id) : []
57958
+ );
57956
57959
  for (const id of notFolded) {
57957
57960
  if (byId2.has(id) || !open.has(id)) continue;
57961
+ if (alreadyDecided.has(id)) continue;
57958
57962
  decided.push({ id, status: "manual", reason: "undecidable", justification: rejectedWhy(id), findings: [] });
57959
57963
  }
57960
- next.packAdjudication = { standard: adj.standard, criteria: decided };
57964
+ const carried = /* @__PURE__ */ new Map();
57965
+ if (audit2.packAdjudication?.standard === adj.standard) {
57966
+ for (const c2 of audit2.packAdjudication.criteria) carried.set(c2.id, c2);
57967
+ }
57968
+ for (const c2 of decided) carried.set(c2.id, c2);
57969
+ next.packAdjudication = { standard: adj.standard, criteria: [...carried.values()] };
57961
57970
  next.findings = [...next.findings, ...newFindings];
57962
57971
  next.adjudicated = { date: adj.auditDate, applied, stillManual, ...rejectedCriteria.length ? { rejected: rejectedCriteria.length } : {} };
57963
57972
  return { ok: issues.length === 0, audit: next, issues, applied, stillManual, rejected: rejectedCriteria.length, rejectedCriteria, grounding };
@@ -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.11.1
7
+ version: 5.11.3
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.11.1";
9
+ var VERSION = "5.11.3";
10
10
  var SCHEMA_VERSION = 2;
11
11
 
12
12
  // src/audit.ts
@@ -2289,7 +2289,7 @@ var wcag_universe_default = {
2289
2289
  wcagVersion: "2.2",
2290
2290
  source: "https://www.w3.org/TR/WCAG22/",
2291
2291
  criteriaSource: "https://github.com/w3c/wcag",
2292
- provenance: "Full WCAG 2.x SC universe (all levels incl. AAA, and the removed 4.1.1 Parsing) fetched from raw.githubusercontent.com/w3c/wcag@main on 2026-08-18 via `node scripts/build-standards.mjs --refresh-universe`. Classification: core-AA = ships in src/data/wcag.json (the shipped WCAG 2.2 AA core); out-of-core = WCAG AAA; removed = obsolete (4.1.1).",
2292
+ provenance: "Full WCAG 2.x SC universe (all levels incl. AAA, and the removed 4.1.1 Parsing) fetched from raw.githubusercontent.com/w3c/wcag@main on 2026-08-19 via `node scripts/build-standards.mjs --refresh-universe`. Classification: core-AA = ships in src/data/wcag.json (the shipped WCAG 2.2 AA core); out-of-core = WCAG AAA; removed = obsolete (4.1.1).",
2293
2293
  criteria: [
2294
2294
  {
2295
2295
  id: "1.1.1",
@@ -57953,11 +57953,20 @@ function applyAdjudication(audit2, adj, opts = {}) {
57953
57953
  decidedBy: "agent"
57954
57954
  });
57955
57955
  }
57956
+ const alreadyDecided = new Set(
57957
+ audit2.packAdjudication?.standard === adj.standard ? audit2.packAdjudication.criteria.filter((c2) => c2.status !== "manual").map((c2) => c2.id) : []
57958
+ );
57956
57959
  for (const id of notFolded) {
57957
57960
  if (byId2.has(id) || !open.has(id)) continue;
57961
+ if (alreadyDecided.has(id)) continue;
57958
57962
  decided.push({ id, status: "manual", reason: "undecidable", justification: rejectedWhy(id), findings: [] });
57959
57963
  }
57960
- next.packAdjudication = { standard: adj.standard, criteria: decided };
57964
+ const carried = /* @__PURE__ */ new Map();
57965
+ if (audit2.packAdjudication?.standard === adj.standard) {
57966
+ for (const c2 of audit2.packAdjudication.criteria) carried.set(c2.id, c2);
57967
+ }
57968
+ for (const c2 of decided) carried.set(c2.id, c2);
57969
+ next.packAdjudication = { standard: adj.standard, criteria: [...carried.values()] };
57961
57970
  next.findings = [...next.findings, ...newFindings];
57962
57971
  next.adjudicated = { date: adj.auditDate, applied, stillManual, ...rejectedCriteria.length ? { rejected: rejectedCriteria.length } : {} };
57963
57972
  return { ok: issues.length === 0, audit: next, issues, applied, stillManual, rejected: rejectedCriteria.length, rejectedCriteria, grounding };
package/src/adjudicate.ts CHANGED
@@ -1003,11 +1003,34 @@ export function applyAdjudication(
1003
1003
  // An OPEN criterion the file never mentioned — a coverage gap, or one the caller declared
1004
1004
  // uncovered — also has to say why it is still to assess; the loop above only walks the
1005
1005
  // items that exist.
1006
+ const alreadyDecided = new Set(
1007
+ audit.packAdjudication?.standard === adj.standard ? audit.packAdjudication.criteria.filter((c) => c.status !== "manual").map((c) => c.id) : [],
1008
+ );
1006
1009
  for (const id of notFolded) {
1007
1010
  if (byId.has(id) || !open.has(id)) continue;
1011
+ // …and never over a verdict an earlier pass already landed: this loop exists to explain
1012
+ // an OPEN criterion, not to reopen a closed one.
1013
+ if (alreadyDecided.has(id)) continue;
1008
1014
  decided.push({ id, status: "manual", reason: "undecidable", justification: rejectedWhy(id), findings: [] });
1009
1015
  }
1010
- next.packAdjudication = { standard: adj.standard, criteria: decided };
1016
+ // MERGE, never replace. A fold used to write `packAdjudication` from the file it was
1017
+ // given and nothing else, which is fine for one fold and wrong for two: a later pass
1018
+ // re-derives its worklist from what is STILL open, so a criterion decided earlier is
1019
+ // ABSENT from it by construction — and rewriting the set dropped it back to « à évaluer ».
1020
+ //
1021
+ // Measured on the first three-pass run: 47 criteria, 5 refused → 41 left; the next pass
1022
+ // ruled those, 4 refused → and the third opened with 47 again. Each pass was undoing the
1023
+ // one before it, so the tier could never converge however much it was allowed to spend.
1024
+ //
1025
+ // What the file rules wins for its own criteria — a pass that names a criterion decides it,
1026
+ // even against an earlier verdict — and everything else it does not mention stays as it
1027
+ // was. Only entries of the SAME standard carry over; a pack change starts a clean sheet.
1028
+ const carried = new Map<string, PackCriterionAdjudication>();
1029
+ if (audit.packAdjudication?.standard === adj.standard) {
1030
+ for (const c of audit.packAdjudication.criteria) carried.set(c.id, c);
1031
+ }
1032
+ for (const c of decided) carried.set(c.id, c);
1033
+ next.packAdjudication = { standard: adj.standard, criteria: [...carried.values()] };
1011
1034
  // The agent's findings still join the flat list so grounding, `check` and the reports can
1012
1035
  // resolve them — but they never touch a WCAG criterion's status.
1013
1036
  next.findings = [...next.findings, ...newFindings];
@@ -2,7 +2,7 @@
2
2
  "wcagVersion": "2.2",
3
3
  "source": "https://www.w3.org/TR/WCAG22/",
4
4
  "criteriaSource": "https://github.com/w3c/wcag",
5
- "provenance": "Full WCAG 2.x SC universe (all levels incl. AAA, and the removed 4.1.1 Parsing) fetched from raw.githubusercontent.com/w3c/wcag@main on 2026-08-18 via `node scripts/build-standards.mjs --refresh-universe`. Classification: core-AA = ships in src/data/wcag.json (the shipped WCAG 2.2 AA core); out-of-core = WCAG AAA; removed = obsolete (4.1.1).",
5
+ "provenance": "Full WCAG 2.x SC universe (all levels incl. AAA, and the removed 4.1.1 Parsing) fetched from raw.githubusercontent.com/w3c/wcag@main on 2026-08-19 via `node scripts/build-standards.mjs --refresh-universe`. Classification: core-AA = ships in src/data/wcag.json (the shipped WCAG 2.2 AA core); out-of-core = WCAG AAA; removed = obsolete (4.1.1).",
6
6
  "criteria": [
7
7
  {
8
8
  "id": "1.1.1",
@@ -165,7 +165,7 @@ export function stayedOnPage(expected: string, actual: string): boolean {
165
165
  * same metadata — a page recorded by Cypress and the same page recorded by Playwright must
166
166
  * land on one identity, or the per-page grid grows a phantom column. */
167
167
  export function buildPayload(
168
- collected: { dom: string; styles?: unknown; boxes?: unknown; css?: unknown; title?: string; url?: string; viewport?: unknown },
168
+ collected: { dom: string; styles?: unknown; boxes?: unknown; css?: unknown; title?: string; url?: string; viewport?: unknown; doctype?: string },
169
169
  url: string,
170
170
  runner: string,
171
171
  opts: CheckOptions,
@@ -182,6 +182,16 @@ export function buildPayload(
182
182
  runner,
183
183
  viewport: collected.viewport,
184
184
  capturedAt: new Date().toISOString(),
185
+ // `documentElement.outerHTML` starts at `<html>`, so the DOM alone drops the doctype and
186
+ // RGAA 8.1 — « chaque page web est-elle définie par un type de document ? » — has nothing
187
+ // to look at. The collector captures it separately; this is where it was being thrown
188
+ // away one step later. Measured: 105 of 106 criteria decided, and the one left was 8.1,
189
+ // whose brief read « this capture predates doctype recording ».
190
+ //
191
+ // `!== undefined`, never a truthiness test: an EMPTY doctype is a page that genuinely has
192
+ // none, which is the non-conformity itself. Collapsing it into "not recorded" would hide
193
+ // a failing page behind « à évaluer ».
194
+ ...(collected.doctype !== undefined ? { doctype: collected.doctype } : {}),
185
195
  ...(opts.auth !== undefined ? { auth: opts.auth } : {}),
186
196
  ...(opts.sources ? { sources: opts.sources } : {}),
187
197
  ...(opts.notes ? { notes: opts.notes } : {}),
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.11.1";
3
+ export const VERSION = "5.11.3";
4
4
  export const SCHEMA_VERSION = 2;
5
5
 
6
6
  // Lang = the UI FRAME's language — the `L` localization tables each module (report,