ultra11y 5.58.1 → 5.58.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.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/.opencode/plugins/ultra11y.js +1 -1
- package/README.md +2 -1
- package/package.json +1 -1
- package/scripts/ultra11y.mjs +18 -4
- package/skills/review-a11y/SKILL.md +1 -1
- package/skills/review-a11y/scripts/ultra11y.mjs +18 -4
- package/skills/ultra11y/SKILL.md +1 -1
- package/skills/ultra11y/scripts/ultra11y.mjs +18 -4
- package/skills/ultra11y/templates/gitlab-ci.yml +1 -1
- package/src/pages.ts +44 -3
- package/src/types.ts +1 -1
|
@@ -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.58.
|
|
13
|
+
"version": "5.58.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.58.
|
|
4
|
+
"version": "5.58.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.58.
|
|
4
|
+
"version": "5.58.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",
|
|
@@ -44,7 +44,7 @@ import { fileURLToPath } from "node:url";
|
|
|
44
44
|
// does not carry it, so a user's own ultra11y.js is never clobbered. Kept as text, not as
|
|
45
45
|
// an export (see above).
|
|
46
46
|
const ULTRA11Y_OPENCODE_PLUGIN = "ULTRA11Y_OPENCODE_PLUGIN";
|
|
47
|
-
const ULTRA11Y_PLUGIN_VERSION = "5.58.
|
|
47
|
+
const ULTRA11Y_PLUGIN_VERSION = "5.58.2";
|
|
48
48
|
const PLUGIN_ID = "ultra11y";
|
|
49
49
|
const SKILL_NAMES = ["ultra11y", "review-a11y"];
|
|
50
50
|
|
package/README.md
CHANGED
|
@@ -449,7 +449,8 @@ or malformed file is reported unreadable. See `skills/ultra11y/references/audit.
|
|
|
449
449
|
and report agree by construction. Two rules hold the line: a finding is attributed to a page
|
|
450
450
|
only when something **says** so (else it is counted as unattributed, never spread across
|
|
451
451
|
pages), and a criterion is conforming *by silence* only on a page whose real rendered DOM
|
|
452
|
-
was audited.
|
|
452
|
+
was audited. An adjudicated non-conformity counts only on the pages its findings are on; an adjudicated
|
|
453
|
+
conformity stays a claim about the whole run. And `pages --format report [--split page]` turns that into the **deliverable an
|
|
453
454
|
auditor hands over**: one dossier per page — identity, **screenshot**, rate, *every* criterion
|
|
454
455
|
of the standard with its status on that page, then each non-conformity as the ordinary auditor
|
|
455
456
|
block. It re-decides nothing and invents no format, so a page sheet and the compliance report
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ultra11y",
|
|
3
|
-
"version": "5.58.
|
|
3
|
+
"version": "5.58.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",
|
package/scripts/ultra11y.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { join as join57, relative as relative8, resolve as resolve20, sep as sep
|
|
|
6
6
|
import { fileURLToPath as fileURLToPath6, pathToFileURL as pathToFileURL3 } from "url";
|
|
7
7
|
|
|
8
8
|
// src/types.ts
|
|
9
|
-
var VERSION = "5.58.
|
|
9
|
+
var VERSION = "5.58.2";
|
|
10
10
|
var SCHEMA_VERSION = 2;
|
|
11
11
|
function isAdjudicated(by) {
|
|
12
12
|
return by === "agent" || by === "human";
|
|
@@ -62754,7 +62754,7 @@ function pageStatus(c2, pageFindings, basis, coverage) {
|
|
|
62754
62754
|
if (c2.status === "manual") return "manual";
|
|
62755
62755
|
if (c2.status === "NA") return "NA";
|
|
62756
62756
|
if (c2.inapplicable) return c2.status;
|
|
62757
|
-
if (c2.decidedBy === "agent" || c2.decidedBy === "human" || c2.decidedBy === "scan") return c2.status;
|
|
62757
|
+
if (c2.status !== "NC" && (c2.decidedBy === "agent" || c2.decidedBy === "human" || c2.decidedBy === "scan")) return c2.status;
|
|
62758
62758
|
if (automatability(c2.id) !== "static") return "manual";
|
|
62759
62759
|
return basis === "snapshot" ? "C" : "manual";
|
|
62760
62760
|
}
|
|
@@ -62783,8 +62783,9 @@ function derivePages(result, pages) {
|
|
|
62783
62783
|
const pf = own.filter((f) => f.criteriaId === c2.id);
|
|
62784
62784
|
const status = pageStatus(c2, pf, p.basis, p.coverage);
|
|
62785
62785
|
const measured2 = status === "C" && c2.status !== "C" && c2.decidedBy === void 0;
|
|
62786
|
-
const
|
|
62787
|
-
const
|
|
62786
|
+
const ruledElsewhere = c2.status === "NC" && status !== "NC" && c2.decidedBy !== void 0;
|
|
62787
|
+
const decidedBy = ruledElsewhere ? void 0 : c2.decidedBy ?? (measured2 ? "scan" : void 0);
|
|
62788
|
+
const justification = measured2 ? measuredHereReason(c2.id, p.coverage) : ruledElsewhere ? void 0 : c2.justification;
|
|
62788
62789
|
return {
|
|
62789
62790
|
id: c2.id,
|
|
62790
62791
|
guideline: c2.guideline,
|
|
@@ -62904,11 +62905,24 @@ function commonOrigin(pages) {
|
|
|
62904
62905
|
function pageOriginNote(origin, lang) {
|
|
62905
62906
|
return origin ? L[lang].originNote(origin) : void 0;
|
|
62906
62907
|
}
|
|
62908
|
+
function adjudicationOnPage(result, adjudication, page) {
|
|
62909
|
+
const stamped = new Set(page.findings.map(findingId));
|
|
62910
|
+
const sources = result.scope.pages?.find((p) => p.id === page.id)?.sources ?? [];
|
|
62911
|
+
const onPage = (f) => stamped.has(findingId(f)) || sources.some((s) => pathMatch2(f.origin?.sourceFile ?? f.file, s));
|
|
62912
|
+
const criteria = adjudication.criteria.flatMap((c2) => {
|
|
62913
|
+
if (c2.status !== "NC") return [c2];
|
|
62914
|
+
const findings = c2.findings.filter(onPage);
|
|
62915
|
+
return findings.some((f) => !f.advisory) ? [{ ...c2, findings }] : [];
|
|
62916
|
+
});
|
|
62917
|
+
return { ...adjudication, criteria };
|
|
62918
|
+
}
|
|
62907
62919
|
function pageView(result, page) {
|
|
62908
62920
|
const own = result.scope.pageSubjects?.[page.id];
|
|
62921
|
+
const packAdjudication = result.packAdjudication ? adjudicationOnPage(result, result.packAdjudication, page) : void 0;
|
|
62909
62922
|
return {
|
|
62910
62923
|
...result,
|
|
62911
62924
|
...own ? { scope: { ...result.scope, subjectsSeen: own } } : {},
|
|
62925
|
+
...packAdjudication ? { packAdjudication } : {},
|
|
62912
62926
|
criteria: page.criteria,
|
|
62913
62927
|
findings: page.findings,
|
|
62914
62928
|
...result.packFindings ? { packFindings: result.packFindings.filter((f) => f.page === page.id) } : {},
|
|
@@ -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.58.
|
|
6
|
+
version: 5.58.2
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# review-a11y — accessibility review of changed code
|
|
@@ -6,7 +6,7 @@ import { join as join57, relative as relative8, resolve as resolve20, sep as sep
|
|
|
6
6
|
import { fileURLToPath as fileURLToPath6, pathToFileURL as pathToFileURL3 } from "url";
|
|
7
7
|
|
|
8
8
|
// src/types.ts
|
|
9
|
-
var VERSION = "5.58.
|
|
9
|
+
var VERSION = "5.58.2";
|
|
10
10
|
var SCHEMA_VERSION = 2;
|
|
11
11
|
function isAdjudicated(by) {
|
|
12
12
|
return by === "agent" || by === "human";
|
|
@@ -62754,7 +62754,7 @@ function pageStatus(c2, pageFindings, basis, coverage) {
|
|
|
62754
62754
|
if (c2.status === "manual") return "manual";
|
|
62755
62755
|
if (c2.status === "NA") return "NA";
|
|
62756
62756
|
if (c2.inapplicable) return c2.status;
|
|
62757
|
-
if (c2.decidedBy === "agent" || c2.decidedBy === "human" || c2.decidedBy === "scan") return c2.status;
|
|
62757
|
+
if (c2.status !== "NC" && (c2.decidedBy === "agent" || c2.decidedBy === "human" || c2.decidedBy === "scan")) return c2.status;
|
|
62758
62758
|
if (automatability(c2.id) !== "static") return "manual";
|
|
62759
62759
|
return basis === "snapshot" ? "C" : "manual";
|
|
62760
62760
|
}
|
|
@@ -62783,8 +62783,9 @@ function derivePages(result, pages) {
|
|
|
62783
62783
|
const pf = own.filter((f) => f.criteriaId === c2.id);
|
|
62784
62784
|
const status = pageStatus(c2, pf, p.basis, p.coverage);
|
|
62785
62785
|
const measured2 = status === "C" && c2.status !== "C" && c2.decidedBy === void 0;
|
|
62786
|
-
const
|
|
62787
|
-
const
|
|
62786
|
+
const ruledElsewhere = c2.status === "NC" && status !== "NC" && c2.decidedBy !== void 0;
|
|
62787
|
+
const decidedBy = ruledElsewhere ? void 0 : c2.decidedBy ?? (measured2 ? "scan" : void 0);
|
|
62788
|
+
const justification = measured2 ? measuredHereReason(c2.id, p.coverage) : ruledElsewhere ? void 0 : c2.justification;
|
|
62788
62789
|
return {
|
|
62789
62790
|
id: c2.id,
|
|
62790
62791
|
guideline: c2.guideline,
|
|
@@ -62904,11 +62905,24 @@ function commonOrigin(pages) {
|
|
|
62904
62905
|
function pageOriginNote(origin, lang) {
|
|
62905
62906
|
return origin ? L[lang].originNote(origin) : void 0;
|
|
62906
62907
|
}
|
|
62908
|
+
function adjudicationOnPage(result, adjudication, page) {
|
|
62909
|
+
const stamped = new Set(page.findings.map(findingId));
|
|
62910
|
+
const sources = result.scope.pages?.find((p) => p.id === page.id)?.sources ?? [];
|
|
62911
|
+
const onPage = (f) => stamped.has(findingId(f)) || sources.some((s) => pathMatch2(f.origin?.sourceFile ?? f.file, s));
|
|
62912
|
+
const criteria = adjudication.criteria.flatMap((c2) => {
|
|
62913
|
+
if (c2.status !== "NC") return [c2];
|
|
62914
|
+
const findings = c2.findings.filter(onPage);
|
|
62915
|
+
return findings.some((f) => !f.advisory) ? [{ ...c2, findings }] : [];
|
|
62916
|
+
});
|
|
62917
|
+
return { ...adjudication, criteria };
|
|
62918
|
+
}
|
|
62907
62919
|
function pageView(result, page) {
|
|
62908
62920
|
const own = result.scope.pageSubjects?.[page.id];
|
|
62921
|
+
const packAdjudication = result.packAdjudication ? adjudicationOnPage(result, result.packAdjudication, page) : void 0;
|
|
62909
62922
|
return {
|
|
62910
62923
|
...result,
|
|
62911
62924
|
...own ? { scope: { ...result.scope, subjectsSeen: own } } : {},
|
|
62925
|
+
...packAdjudication ? { packAdjudication } : {},
|
|
62912
62926
|
criteria: page.criteria,
|
|
62913
62927
|
findings: page.findings,
|
|
62914
62928
|
...result.packFindings ? { packFindings: result.packFindings.filter((f) => f.page === page.id) } : {},
|
package/skills/ultra11y/SKILL.md
CHANGED
|
@@ -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 102 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.58.
|
|
6
|
+
version: 5.58.2
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# ultra11y — audit WCAG 2.2 AA and write accessible markup
|
|
@@ -6,7 +6,7 @@ import { join as join57, relative as relative8, resolve as resolve20, sep as sep
|
|
|
6
6
|
import { fileURLToPath as fileURLToPath6, pathToFileURL as pathToFileURL3 } from "url";
|
|
7
7
|
|
|
8
8
|
// src/types.ts
|
|
9
|
-
var VERSION = "5.58.
|
|
9
|
+
var VERSION = "5.58.2";
|
|
10
10
|
var SCHEMA_VERSION = 2;
|
|
11
11
|
function isAdjudicated(by) {
|
|
12
12
|
return by === "agent" || by === "human";
|
|
@@ -62754,7 +62754,7 @@ function pageStatus(c2, pageFindings, basis, coverage) {
|
|
|
62754
62754
|
if (c2.status === "manual") return "manual";
|
|
62755
62755
|
if (c2.status === "NA") return "NA";
|
|
62756
62756
|
if (c2.inapplicable) return c2.status;
|
|
62757
|
-
if (c2.decidedBy === "agent" || c2.decidedBy === "human" || c2.decidedBy === "scan") return c2.status;
|
|
62757
|
+
if (c2.status !== "NC" && (c2.decidedBy === "agent" || c2.decidedBy === "human" || c2.decidedBy === "scan")) return c2.status;
|
|
62758
62758
|
if (automatability(c2.id) !== "static") return "manual";
|
|
62759
62759
|
return basis === "snapshot" ? "C" : "manual";
|
|
62760
62760
|
}
|
|
@@ -62783,8 +62783,9 @@ function derivePages(result, pages) {
|
|
|
62783
62783
|
const pf = own.filter((f) => f.criteriaId === c2.id);
|
|
62784
62784
|
const status = pageStatus(c2, pf, p.basis, p.coverage);
|
|
62785
62785
|
const measured2 = status === "C" && c2.status !== "C" && c2.decidedBy === void 0;
|
|
62786
|
-
const
|
|
62787
|
-
const
|
|
62786
|
+
const ruledElsewhere = c2.status === "NC" && status !== "NC" && c2.decidedBy !== void 0;
|
|
62787
|
+
const decidedBy = ruledElsewhere ? void 0 : c2.decidedBy ?? (measured2 ? "scan" : void 0);
|
|
62788
|
+
const justification = measured2 ? measuredHereReason(c2.id, p.coverage) : ruledElsewhere ? void 0 : c2.justification;
|
|
62788
62789
|
return {
|
|
62789
62790
|
id: c2.id,
|
|
62790
62791
|
guideline: c2.guideline,
|
|
@@ -62904,11 +62905,24 @@ function commonOrigin(pages) {
|
|
|
62904
62905
|
function pageOriginNote(origin, lang) {
|
|
62905
62906
|
return origin ? L[lang].originNote(origin) : void 0;
|
|
62906
62907
|
}
|
|
62908
|
+
function adjudicationOnPage(result, adjudication, page) {
|
|
62909
|
+
const stamped = new Set(page.findings.map(findingId));
|
|
62910
|
+
const sources = result.scope.pages?.find((p) => p.id === page.id)?.sources ?? [];
|
|
62911
|
+
const onPage = (f) => stamped.has(findingId(f)) || sources.some((s) => pathMatch2(f.origin?.sourceFile ?? f.file, s));
|
|
62912
|
+
const criteria = adjudication.criteria.flatMap((c2) => {
|
|
62913
|
+
if (c2.status !== "NC") return [c2];
|
|
62914
|
+
const findings = c2.findings.filter(onPage);
|
|
62915
|
+
return findings.some((f) => !f.advisory) ? [{ ...c2, findings }] : [];
|
|
62916
|
+
});
|
|
62917
|
+
return { ...adjudication, criteria };
|
|
62918
|
+
}
|
|
62907
62919
|
function pageView(result, page) {
|
|
62908
62920
|
const own = result.scope.pageSubjects?.[page.id];
|
|
62921
|
+
const packAdjudication = result.packAdjudication ? adjudicationOnPage(result, result.packAdjudication, page) : void 0;
|
|
62909
62922
|
return {
|
|
62910
62923
|
...result,
|
|
62911
62924
|
...own ? { scope: { ...result.scope, subjectsSeen: own } } : {},
|
|
62925
|
+
...packAdjudication ? { packAdjudication } : {},
|
|
62912
62926
|
criteria: page.criteria,
|
|
62913
62927
|
findings: page.findings,
|
|
62914
62928
|
...result.packFindings ? { packFindings: result.packFindings.filter((f) => f.page === page.id) } : {},
|
|
@@ -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.58.
|
|
30
|
+
ULTRA11Y_VERSION: '5.58.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/pages.ts
CHANGED
|
@@ -290,7 +290,12 @@ function pageStatus(c: CriterionResult, pageFindings: Finding[], basis: PageScop
|
|
|
290
290
|
// nothing to do with. That is what makes a complete page grid reachable at all, and it is
|
|
291
291
|
// labelled as a scope-wide decision where it is rendered.
|
|
292
292
|
// A named human auditor's ruling is the same kind of recorded verdict.
|
|
293
|
-
|
|
293
|
+
//
|
|
294
|
+
// EXCEPT AN NC. A clearing verdict says something about the whole scope; an NC rests on
|
|
295
|
+
// findings with a location, and this page has none of them (they would have returned above).
|
|
296
|
+
// It falls through to rule 3 like any other NC that fired somewhere else — carried here, it
|
|
297
|
+
// gave every page of a run the same list of non-conformities.
|
|
298
|
+
if (c.status !== "NC" && (c.decidedBy === "agent" || c.decidedBy === "human" || c.decidedBy === "scan")) return c.status;
|
|
294
299
|
|
|
295
300
|
// 3. SILENCE ONLY DECIDES WHAT THE ENGINE CAN DECIDE.
|
|
296
301
|
//
|
|
@@ -355,8 +360,11 @@ export function derivePages(result: AuditResult, pages: PageScope[]): PageResult
|
|
|
355
360
|
// justification is re-derived too: the scope-wide one says why the criterion stayed OPEN
|
|
356
361
|
// ("probed on 19 of the 20 pages"), which is the opposite of what happened here.
|
|
357
362
|
const measured = status === "C" && c.status !== "C" && c.decidedBy === undefined;
|
|
358
|
-
|
|
359
|
-
|
|
363
|
+
// An NC ruled elsewhere is nobody's verdict on THIS page: neither the provenance nor the
|
|
364
|
+
// reasons given for the other pages belong on its row.
|
|
365
|
+
const ruledElsewhere = c.status === "NC" && status !== "NC" && c.decidedBy !== undefined;
|
|
366
|
+
const decidedBy = ruledElsewhere ? undefined : (c.decidedBy ?? (measured ? "scan" : undefined));
|
|
367
|
+
const justification = measured ? measuredHereReason(c.id, p.coverage) : ruledElsewhere ? undefined : c.justification;
|
|
360
368
|
return {
|
|
361
369
|
id: c.id,
|
|
362
370
|
guideline: c.guideline,
|
|
@@ -563,6 +571,37 @@ export interface PageGridModel {
|
|
|
563
571
|
human: Set<string>;
|
|
564
572
|
}
|
|
565
573
|
|
|
574
|
+
/** The run's recorded verdicts as they apply to ONE page.
|
|
575
|
+
*
|
|
576
|
+
* `derivePackResults` prefers a recorded verdict over its own derivation, and a verdict is
|
|
577
|
+
* scope-wide. For a clearing verdict that is the documented claim (see `pageStatus`). For an NC
|
|
578
|
+
* it is not: the verdict rests on findings with a location, so one defect on one route made the
|
|
579
|
+
* criterion NC on all of them. Measured on a 38-page sweep: seven NC verdicts located on zero to
|
|
580
|
+
* four pages each, and 38 identical sheets.
|
|
581
|
+
*
|
|
582
|
+
* An NC therefore reaches this page only with the findings that are on it. Without any, the
|
|
583
|
+
* entry leaves the view and the page falls back on its own derivation, which is what honesty
|
|
584
|
+
* rule 3 asks of any NC that fired elsewhere.
|
|
585
|
+
*
|
|
586
|
+
* A source a page declares counts on that page even when `attributePages` stamped the finding
|
|
587
|
+
* on another one: first-match is there to keep occurrence counts from inflating, and here the
|
|
588
|
+
* question is whether this page ships the defect. */
|
|
589
|
+
function adjudicationOnPage(
|
|
590
|
+
result: AuditResult,
|
|
591
|
+
adjudication: NonNullable<AuditResult["packAdjudication"]>,
|
|
592
|
+
page: PageResult,
|
|
593
|
+
): NonNullable<AuditResult["packAdjudication"]> {
|
|
594
|
+
const stamped = new Set(page.findings.map(findingId));
|
|
595
|
+
const sources = result.scope.pages?.find((p) => p.id === page.id)?.sources ?? [];
|
|
596
|
+
const onPage = (f: Finding): boolean => stamped.has(findingId(f)) || sources.some((s) => pathMatch(f.origin?.sourceFile ?? f.file, s));
|
|
597
|
+
const criteria = adjudication.criteria.flatMap((c) => {
|
|
598
|
+
if (c.status !== "NC") return [c];
|
|
599
|
+
const findings = c.findings.filter(onPage);
|
|
600
|
+
return findings.some((f) => !f.advisory) ? [{ ...c, findings }] : [];
|
|
601
|
+
});
|
|
602
|
+
return { ...adjudication, criteria };
|
|
603
|
+
}
|
|
604
|
+
|
|
566
605
|
/** A view of the audit restricted to ONE page: the same shape, with this page's criterion
|
|
567
606
|
* statuses and findings. Feeding it to `derivePackResults` is what makes the grid agree with
|
|
568
607
|
* the report BY CONSTRUCTION — out-of-scope criteria (RGAA 8.1), scoped-out siblings, pack
|
|
@@ -585,9 +624,11 @@ export function pageView(result: AuditResult, page: PageResult): AuditResult {
|
|
|
585
624
|
//
|
|
586
625
|
// Absent map ⇒ unchanged behaviour, so an audit written before the fold reads as it always did.
|
|
587
626
|
const own = result.scope.pageSubjects?.[page.id];
|
|
627
|
+
const packAdjudication = result.packAdjudication ? adjudicationOnPage(result, result.packAdjudication, page) : undefined;
|
|
588
628
|
return {
|
|
589
629
|
...result,
|
|
590
630
|
...(own ? { scope: { ...result.scope, subjectsSeen: own } } : {}),
|
|
631
|
+
...(packAdjudication ? { packAdjudication } : {}),
|
|
591
632
|
criteria: page.criteria,
|
|
592
633
|
findings: page.findings,
|
|
593
634
|
...(result.packFindings ? { packFindings: result.packFindings.filter((f) => f.page === page.id) } : {}),
|
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.58.
|
|
3
|
+
export const VERSION = "5.58.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,
|