ultra11y 5.58.2 → 5.58.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.
- 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 +3 -1
- package/package.json +1 -1
- package/scripts/ultra11y.mjs +92 -52
- package/skills/review-a11y/SKILL.md +1 -1
- package/skills/review-a11y/scripts/ultra11y.mjs +92 -52
- package/skills/ultra11y/SKILL.md +1 -1
- package/skills/ultra11y/references/pages.md +6 -5
- package/skills/ultra11y/scripts/ultra11y.mjs +92 -52
- package/skills/ultra11y/templates/gitlab-ci.yml +1 -1
- package/src/html-report.ts +3 -5
- package/src/messages.ts +2 -2
- package/src/pages-report.ts +77 -14
- package/src/pages.ts +45 -10
- package/src/report.ts +8 -46
- 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.3",
|
|
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.3",
|
|
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.3",
|
|
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.3";
|
|
48
48
|
const PLUGIN_ID = "ultra11y";
|
|
49
49
|
const SKILL_NAMES = ["ultra11y", "review-a11y"];
|
|
50
50
|
|
package/README.md
CHANGED
|
@@ -450,7 +450,9 @@ or malformed file is reported unreadable. See `skills/ultra11y/references/audit.
|
|
|
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
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
|
|
453
|
+
conformity stays a claim about the whole run, except on a page with none of the criterion's
|
|
454
|
+
subject. Under a country standard, a page's rate uses the overall rate's formula: validated ÷
|
|
455
|
+
applicable, so a criterion still to assess keeps it a floor. And `pages --format report [--split page]` turns that into the **deliverable an
|
|
454
456
|
auditor hands over**: one dossier per page — identity, **screenshot**, rate, *every* criterion
|
|
455
457
|
of the standard with its status on that page, then each non-conformity as the ordinary auditor
|
|
456
458
|
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.3",
|
|
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.3";
|
|
10
10
|
var SCHEMA_VERSION = 2;
|
|
11
11
|
function isAdjudicated(by) {
|
|
12
12
|
return by === "agent" || by === "human";
|
|
@@ -39066,8 +39066,8 @@ var MSG_CATALOG = {
|
|
|
39066
39066
|
en: (p) => `Untagged PDF document (PDF ${p.version}) \u2014 ${p.marked === "yes" ? "/MarkInfo declares it marked" : "no /MarkInfo << /Marked true >>"}, ${p.structTree === "yes" ? "a structure tree exists" : "no structure tree (/StructTreeRoot)"}: assistive technology reads a flat stream of text with no headings, lists or tables.`
|
|
39067
39067
|
},
|
|
39068
39068
|
remediation: {
|
|
39069
|
-
fr: () => `Produisez un PDF balis\xE9 (PDF/UA-1) depuis l'outil source, ou proposez une version alternative accessible (HTML ou document balis\xE9) ; v\xE9rifiez le r\xE9sultat avec veraPDF ou PAC.`,
|
|
39070
|
-
en: () => `Produce a tagged PDF (PDF/UA-1) from the source tool, or offer an accessible alternative version (HTML or a tagged document); check the result with veraPDF or PAC.`
|
|
39069
|
+
fr: () => `Produisez un PDF balis\xE9 (PDF/UA-1) depuis l'outil source, ou proposez une version alternative accessible (HTML ou document balis\xE9) ; v\xE9rifiez le r\xE9sultat avec veraPDF ou PAC. En JavaScript, utilisez PDFKit (https://github.com/foliojs/pdfkit) : options \`subset: 'PDF/UA'\`, \`tagged: true\`, \`displayTitle: true\`, \`lang\`, un titre dans \`info\`, des polices TrueType ou OpenType incorpor\xE9es, et tout le contenu balis\xE9 ou marqu\xE9 comme artefact. PDFKit ne balise ni les annotations (dont les liens) ni les formulaires : pour ces contenus, pr\xE9voyez une version alternative accessible.`,
|
|
39070
|
+
en: () => `Produce a tagged PDF (PDF/UA-1) from the source tool, or offer an accessible alternative version (HTML or a tagged document); check the result with veraPDF or PAC. In JavaScript, use PDFKit (https://github.com/foliojs/pdfkit): options \`subset: 'PDF/UA'\`, \`tagged: true\`, \`displayTitle: true\`, \`lang\`, a title in \`info\`, embedded TrueType or OpenType fonts, and all content tagged or marked as an artifact. PDFKit does not tag annotations (links included) or forms: for those, provide an accessible alternative version.`
|
|
39071
39071
|
}
|
|
39072
39072
|
},
|
|
39073
39073
|
"pdf-lang-missing": {
|
|
@@ -62905,11 +62905,19 @@ function commonOrigin(pages) {
|
|
|
62905
62905
|
function pageOriginNote(origin, lang) {
|
|
62906
62906
|
return origin ? L[lang].originNote(origin) : void 0;
|
|
62907
62907
|
}
|
|
62908
|
+
var NOTHING_ON_THIS_PAGE = "Nothing of this criterion's kind is present on this page.";
|
|
62908
62909
|
function adjudicationOnPage(result, adjudication, page) {
|
|
62909
62910
|
const stamped = new Set(page.findings.map(findingId));
|
|
62910
62911
|
const sources = result.scope.pages?.find((p) => p.id === page.id)?.sources ?? [];
|
|
62911
62912
|
const onPage = (f) => stamped.has(findingId(f)) || sources.some((s) => pathMatch2(f.origin?.sourceFile ?? f.file, s));
|
|
62913
|
+
const seen = result.scope.pageSubjects?.[page.id];
|
|
62914
|
+
const absentHere = (id) => {
|
|
62915
|
+
if (!seen) return false;
|
|
62916
|
+
const wcag = getCriterion(loadPack(adjudication.standard), id)?.wcag ?? [];
|
|
62917
|
+
return subjectsAbsent(subjectsForPackCriterion(adjudication.standard, id, wcag), new Set(seen));
|
|
62918
|
+
};
|
|
62912
62919
|
const criteria = adjudication.criteria.flatMap((c2) => {
|
|
62920
|
+
if (c2.status === "C" && absentHere(c2.id)) return [{ ...c2, status: "NA", justification: NOTHING_ON_THIS_PAGE }];
|
|
62913
62921
|
if (c2.status !== "NC") return [c2];
|
|
62914
62922
|
const findings = c2.findings.filter(onPage);
|
|
62915
62923
|
return findings.some((f) => !f.advisory) ? [{ ...c2, findings }] : [];
|
|
@@ -62933,6 +62941,7 @@ function pageView(result, page) {
|
|
|
62933
62941
|
function pageGridModel(result, derived, standard, lang) {
|
|
62934
62942
|
const status = /* @__PURE__ */ new Map();
|
|
62935
62943
|
const human = /* @__PURE__ */ new Set();
|
|
62944
|
+
const inapplicable = /* @__PURE__ */ new Set();
|
|
62936
62945
|
const put = (rowId, pageId, s) => {
|
|
62937
62946
|
const m = status.get(rowId) ?? /* @__PURE__ */ new Map();
|
|
62938
62947
|
m.set(pageId, s);
|
|
@@ -62945,18 +62954,20 @@ function pageGridModel(result, derived, standard, lang) {
|
|
|
62945
62954
|
put(c2.id, p.id, c2.status);
|
|
62946
62955
|
if (c2.decidedBy === "human") human.add(`${c2.id}|${p.id}`);
|
|
62947
62956
|
}
|
|
62948
|
-
return { rows: rows2, status, human };
|
|
62957
|
+
return { rows: rows2, status, human, inapplicable };
|
|
62949
62958
|
}
|
|
62950
62959
|
const pack = loadPack(standard);
|
|
62951
62960
|
const rows = pack.criteria.map((pc) => ({ id: pc.id, label: pc.id, group: `${pc.theme}. ${themeName(pack, pc.theme, lang) ?? ""}`.trim() }));
|
|
62952
62961
|
for (const p of derived) {
|
|
62953
62962
|
for (const pc of derivePackResults(pageView(result, p), standard, p.id)) {
|
|
62954
62963
|
const criterion = pack.criteria.find((row) => row.id === pc.id);
|
|
62955
|
-
|
|
62964
|
+
const provisional = isProvisionalJudgmentInapplicable(pc, criterion);
|
|
62965
|
+
put(pc.id, p.id, provisional ? "manual" : pc.status);
|
|
62956
62966
|
if (pc.decidedBy === "human") human.add(`${pc.id}|${p.id}`);
|
|
62967
|
+
if (pc.inapplicable && !provisional) inapplicable.add(`${pc.id}|${p.id}`);
|
|
62957
62968
|
}
|
|
62958
62969
|
}
|
|
62959
|
-
return { rows, status, human };
|
|
62970
|
+
return { rows, status, human, inapplicable };
|
|
62960
62971
|
}
|
|
62961
62972
|
function renderRedirected(redirected, lang = "en") {
|
|
62962
62973
|
const fr = lang === "fr";
|
|
@@ -62972,16 +62983,24 @@ function renderRedirected(redirected, lang = "en") {
|
|
|
62972
62983
|
}
|
|
62973
62984
|
return out2;
|
|
62974
62985
|
}
|
|
62975
|
-
function gridRate(rows, status, pageId) {
|
|
62986
|
+
function gridRate(rows, status, pageId, inapplicable) {
|
|
62976
62987
|
let c2 = 0;
|
|
62977
62988
|
let nc = 0;
|
|
62989
|
+
let open = 0;
|
|
62990
|
+
let absent = 0;
|
|
62978
62991
|
for (const row of rows) {
|
|
62979
62992
|
const st = status.get(row.id)?.get(pageId);
|
|
62980
|
-
if (st === "C")
|
|
62981
|
-
|
|
62993
|
+
if (st === "C") {
|
|
62994
|
+
c2++;
|
|
62995
|
+
if (inapplicable?.has(`${row.id}|${pageId}`)) absent++;
|
|
62996
|
+
} else if (st === "NC") nc++;
|
|
62997
|
+
else if (st === "manual") open++;
|
|
62982
62998
|
}
|
|
62983
62999
|
const decided = c2 + nc;
|
|
62984
|
-
return [decided === 0 ? null : Math.round(c2 / decided * 100), decided, rows.length];
|
|
63000
|
+
if (!inapplicable) return [decided === 0 ? null : Math.round(c2 / decided * 100), decided, rows.length];
|
|
63001
|
+
const validated = c2 - absent;
|
|
63002
|
+
const applicable = validated + nc + open;
|
|
63003
|
+
return [validated + nc === 0 ? null : Math.round(validated / applicable * 100), validated, applicable];
|
|
62985
63004
|
}
|
|
62986
63005
|
function renderPageGrid(result, pages, standard = CORE2, lang = "en") {
|
|
62987
63006
|
const s = L[lang];
|
|
@@ -63000,8 +63019,10 @@ function renderPageGrid(result, pages, standard = CORE2, lang = "en") {
|
|
|
63000
63019
|
if (originNote) out2.push(`> ${originNote}`, "");
|
|
63001
63020
|
const head = [s.criterion, ...derived.map((p) => pageColumnLabel(p, origin))];
|
|
63002
63021
|
out2.push(`| ${head.join(" | ")} |`, `| ${head.map(() => "---").join(" | ")} |`);
|
|
63003
|
-
const { rows, status, human } = pageGridModel(result, derived, standard, lang);
|
|
63004
|
-
out2.push(
|
|
63022
|
+
const { rows, status, human, inapplicable } = pageGridModel(result, derived, standard, lang);
|
|
63023
|
+
out2.push(
|
|
63024
|
+
`| **${s.rate}** | ${derived.map((p) => `**${formatRate(...gridRate(rows, status, p.id, isCore(standard) ? void 0 : inapplicable))}**`).join(" | ")} |`
|
|
63025
|
+
);
|
|
63005
63026
|
out2.push(`| _${s.snapshot}?_ | ${derived.map((p) => `_${basisLabel(p.basis, lang)}_`).join(" | ")} |`);
|
|
63006
63027
|
let group = "";
|
|
63007
63028
|
let humanRuled = false;
|
|
@@ -63764,13 +63785,17 @@ var L4 = {
|
|
|
63764
63785
|
producer: "Producteur",
|
|
63765
63786
|
auth: "Authentification requise",
|
|
63766
63787
|
rate: "Taux de r\xE9ussite automatique (v\xE9rifications statiques)",
|
|
63788
|
+
packRate: "Taux de conformit\xE9 de la page",
|
|
63767
63789
|
// The index has its own, shorter header — the sheet's label is a full sentence and would
|
|
63768
63790
|
// wreck an eight-column table. Kept as a SEPARATE key: editing `rate` in place would
|
|
63769
63791
|
// silently reword the sheet bullet too.
|
|
63770
63792
|
rateShort: "Taux (crit\xE8res d\xE9cid\xE9s)",
|
|
63793
|
+
packRateShort: "Taux (valid\xE9s \xF7 applicables)",
|
|
63771
63794
|
rateNote: "sous-ensemble d\xE9cidable : C \xF7 (C + NC)",
|
|
63795
|
+
packRateNote: "crit\xE8res valid\xE9s \xF7 crit\xE8res applicables, ceux \xE0 \xE9valuer comptant au d\xE9nominateur",
|
|
63772
63796
|
tally: (c2, nc, na, m) => `${c2} conforme(s) \xB7 ${nc} non conforme(s) \xB7 ${na} non applicable(s) \xB7 ${m} \xE0 \xE9valuer`,
|
|
63773
63797
|
coverage: (decided, total) => `Couverture : ${decided}/${total} crit\xE8re(s) \xE9valu\xE9(s) \u2014 le taux ci-dessus ne porte que sur eux, et ne dit rien des ${total - decided} autres.`,
|
|
63798
|
+
packCoverage: (decided, total) => `Couverture : ${decided}/${total} crit\xE8re(s) \xE9valu\xE9(s). Tant qu'il en reste ${total - decided} \xE0 \xE9valuer, le taux ci-dessus est un plancher.`,
|
|
63774
63799
|
tests: "Tests",
|
|
63775
63800
|
screenshotAlt: (n) => `Capture d'\xE9cran de la page ${n}`,
|
|
63776
63801
|
noScreenshot: "Aucune capture d'\xE9cran pour cette page (le producteur n'en a pas fourni) \u2014 le tier pixel est donc inactif ici.",
|
|
@@ -63789,7 +63814,8 @@ var L4 = {
|
|
|
63789
63814
|
blocking: "Bloquant",
|
|
63790
63815
|
major: "Majeur",
|
|
63791
63816
|
minor: "Mineur",
|
|
63792
|
-
indexNote: "Une fiche par page. `X % (d/t)` : le taux ne porte que sur les `d` crit\xE8res d\xE9cid\xE9s sur `t` \u2014 il ne dit rien des autres. `\u2014` signifie qu'aucun crit\xE8re n'a \xE9t\xE9 d\xE9cid\xE9 sur cette page, et ne vaut donc NI conformit\xE9 NI non-conformit\xE9."
|
|
63817
|
+
indexNote: "Une fiche par page. `X % (d/t)` : le taux ne porte que sur les `d` crit\xE8res d\xE9cid\xE9s sur `t` \u2014 il ne dit rien des autres. `\u2014` signifie qu'aucun crit\xE8re n'a \xE9t\xE9 d\xE9cid\xE9 sur cette page, et ne vaut donc NI conformit\xE9 NI non-conformit\xE9.",
|
|
63818
|
+
packIndexNote: "Une fiche par page. `X % (v/a)` : crit\xE8res valid\xE9s \xF7 crit\xE8res applicables, la formule du taux global. Un crit\xE8re sans sujet sur la page sort du calcul ; un crit\xE8re \xE0 \xE9valuer reste au d\xE9nominateur, le taux est donc un plancher. `\u2014` signifie qu'aucun crit\xE8re n'a \xE9t\xE9 d\xE9cid\xE9 sur cette page, et ne vaut donc NI conformit\xE9 NI non-conformit\xE9."
|
|
63793
63819
|
},
|
|
63794
63820
|
en: {
|
|
63795
63821
|
docTitle: "Page-by-page accessibility report",
|
|
@@ -63807,10 +63833,14 @@ var L4 = {
|
|
|
63807
63833
|
producer: "Producer",
|
|
63808
63834
|
auth: "Authentication required",
|
|
63809
63835
|
rate: "Automatic static-check pass rate",
|
|
63836
|
+
packRate: "Page conformance rate",
|
|
63810
63837
|
rateShort: "Rate (decided criteria)",
|
|
63838
|
+
packRateShort: "Rate (validated \xF7 applicable)",
|
|
63811
63839
|
rateNote: "decidable subset: C \xF7 (C + NC)",
|
|
63840
|
+
packRateNote: "validated criteria \xF7 applicable criteria, those still to assess counting in the denominator",
|
|
63812
63841
|
tally: (c2, nc, na, m) => `${c2} conforming \xB7 ${nc} non-conforming \xB7 ${na} not applicable \xB7 ${m} to assess`,
|
|
63813
63842
|
coverage: (decided, total) => `Coverage: ${decided}/${total} criteria assessed \u2014 the rate above covers only those, and says nothing about the other ${total - decided}.`,
|
|
63843
|
+
packCoverage: (decided, total) => `Coverage: ${decided}/${total} criteria assessed. While ${total - decided} remain to assess, the rate above is a floor.`,
|
|
63814
63844
|
tests: "Tests",
|
|
63815
63845
|
screenshotAlt: (n) => `Screenshot of the ${n} page`,
|
|
63816
63846
|
noScreenshot: "No screenshot for this page (the producer supplied none) \u2014 the pixel tier is therefore inactive here.",
|
|
@@ -63829,7 +63859,8 @@ var L4 = {
|
|
|
63829
63859
|
blocking: "Blocking",
|
|
63830
63860
|
major: "Major",
|
|
63831
63861
|
minor: "Minor",
|
|
63832
|
-
indexNote: "One sheet per page. `X % (d/t)`: the rate covers only the `d` criteria decided out of `t` \u2014 it says nothing about the others. `\u2014` means no criterion was decided on this page, so it is NEITHER conformity NOR non-conformity."
|
|
63862
|
+
indexNote: "One sheet per page. `X % (d/t)`: the rate covers only the `d` criteria decided out of `t` \u2014 it says nothing about the others. `\u2014` means no criterion was decided on this page, so it is NEITHER conformity NOR non-conformity.",
|
|
63863
|
+
packIndexNote: "One sheet per page. `X % (v/a)`: validated criteria \xF7 applicable criteria, the formula of the overall rate. A criterion with no subject on the page leaves the calculation; one still to assess stays in the denominator, so the rate is a floor. `\u2014` means no criterion was decided on this page, so it is NEITHER conformity NOR non-conformity."
|
|
63833
63864
|
}
|
|
63834
63865
|
};
|
|
63835
63866
|
function pageCriterionRows(result, page, standard, lang) {
|
|
@@ -63874,7 +63905,7 @@ function pagesForStandard(result, pages, standard, lang) {
|
|
|
63874
63905
|
findings: [],
|
|
63875
63906
|
...r.decidedBy ? { decidedBy: r.decidedBy } : {}
|
|
63876
63907
|
})),
|
|
63877
|
-
conformancePct: pageRatePct(rows),
|
|
63908
|
+
conformancePct: pageRatePct(rows, standard),
|
|
63878
63909
|
decided: cov.decided,
|
|
63879
63910
|
total: cov.total
|
|
63880
63911
|
};
|
|
@@ -63898,9 +63929,36 @@ function pageCoverage(rows) {
|
|
|
63898
63929
|
const t3 = pageTally(rows);
|
|
63899
63930
|
return { decided: t3.c + t3.nc, total: rows.length };
|
|
63900
63931
|
}
|
|
63901
|
-
function
|
|
63902
|
-
const
|
|
63903
|
-
|
|
63932
|
+
function conformanceRate(t3) {
|
|
63933
|
+
const validated = Math.max(0, t3.c - t3.na);
|
|
63934
|
+
const applicable = validated + t3.nc + t3.manual;
|
|
63935
|
+
return {
|
|
63936
|
+
// No applicable criterion is not a failure — it is a scope with nothing of any kind in it,
|
|
63937
|
+
// and the repository's convention for an empty denominator is 100 (src/audit.ts
|
|
63938
|
+
// conformancePct). Divergent conventions on the same question is how two numbers describing
|
|
63939
|
+
// one grid start disagreeing.
|
|
63940
|
+
pct: applicable === 0 ? 100 : Math.round(validated / applicable * 100),
|
|
63941
|
+
validated,
|
|
63942
|
+
applicable,
|
|
63943
|
+
na: t3.na,
|
|
63944
|
+
open: t3.manual,
|
|
63945
|
+
decided: t3.c + t3.nc,
|
|
63946
|
+
total: t3.c + t3.nc + t3.manual
|
|
63947
|
+
};
|
|
63948
|
+
}
|
|
63949
|
+
function pageRatePct(rows, standard) {
|
|
63950
|
+
const t3 = pageTally(rows);
|
|
63951
|
+
if (isCore(standard)) return t3.c + t3.nc === 0 ? null : Math.round(t3.c / (t3.c + t3.nc) * 100);
|
|
63952
|
+
const rate = conformanceRate(t3);
|
|
63953
|
+
return rate.validated + t3.nc === 0 ? null : rate.pct;
|
|
63954
|
+
}
|
|
63955
|
+
function formatPageRate(rows, standard) {
|
|
63956
|
+
if (isCore(standard)) {
|
|
63957
|
+
const cov = pageCoverage(rows);
|
|
63958
|
+
return formatRate(pageRatePct(rows, standard), cov.decided, cov.total);
|
|
63959
|
+
}
|
|
63960
|
+
const rate = conformanceRate(pageTally(rows));
|
|
63961
|
+
return formatRate(pageRatePct(rows, standard), rate.validated, rate.applicable);
|
|
63904
63962
|
}
|
|
63905
63963
|
function renderPageReport(result, page, opts = {}) {
|
|
63906
63964
|
const standard = opts.standard ?? CORE2;
|
|
@@ -63917,10 +63975,13 @@ function renderPageReport(result, page, opts = {}) {
|
|
|
63917
63975
|
const rows = pageCriterionRows(result, page, standard, lang);
|
|
63918
63976
|
const t3 = pageTally(rows);
|
|
63919
63977
|
const cov = pageCoverage(rows);
|
|
63920
|
-
const
|
|
63921
|
-
|
|
63978
|
+
const pack = !isCore(standard);
|
|
63979
|
+
const rate = pageRatePct(rows, standard);
|
|
63980
|
+
out2.push(
|
|
63981
|
+
pack ? `- **${s.packRate}** : **${formatPageRate(rows, standard)}** _(${s.packRateNote})_` : `- **${s.rate}** : **${rate === null ? "\u2014" : `${rate} %`}** _(${s.rateNote})_`
|
|
63982
|
+
);
|
|
63922
63983
|
out2.push(`- ${pageTallyNote(t3, lang)}`);
|
|
63923
|
-
out2.push(`- ${s.coverage(cov.decided, cov.total)}`, "");
|
|
63984
|
+
out2.push(`- ${(pack ? s.packCoverage : s.coverage)(cov.decided, cov.total)}`, "");
|
|
63924
63985
|
if (page.basis !== "snapshot") out2.push(`> \u26A0\uFE0F ${page.basis === "loading" ? pageBasisWarning("loading", lang) : s.sourceWarn}`, "");
|
|
63925
63986
|
const shot = opts.screenshots?.get(page.id);
|
|
63926
63987
|
if (shot) out2.push(``, "");
|
|
@@ -63975,16 +64036,16 @@ function renderPagesIndex(result, pages, opts = {}) {
|
|
|
63975
64036
|
const lang = opts.lang ?? "en";
|
|
63976
64037
|
const s = L4[lang];
|
|
63977
64038
|
const out2 = header2(result, pages, standard, lang, s.indexTitle);
|
|
63978
|
-
|
|
63979
|
-
out2.push(
|
|
64039
|
+
const pack = !isCore(standard);
|
|
64040
|
+
out2.push(`> ${pack ? s.packIndexNote : s.indexNote}`, "");
|
|
64041
|
+
out2.push(`| ${s.page} | ${s.url} | ${s.basis} | ${pack ? s.packRateShort : s.rateShort} | ${s.blocking} | ${s.major} | ${s.minor} | ${s.sheet} |`);
|
|
63980
64042
|
out2.push("| --- | --- | --- | --- | --- | --- | --- | --- |");
|
|
63981
64043
|
for (const p of pages) {
|
|
63982
64044
|
const rows = pageCriterionRows(result, p, standard, lang);
|
|
63983
|
-
const cov = pageCoverage(rows);
|
|
63984
64045
|
const nc = [...p.findings, ...(result.packFindings ?? []).filter((f) => f.page === p.id)].filter((f) => !f.advisory);
|
|
63985
64046
|
const href = opts.hrefs?.get(p.id);
|
|
63986
64047
|
out2.push(
|
|
63987
|
-
`| ${p.name}${p.auth ? " \u{1F512}" : ""} | \`${p.url}\` | ${basisLabel(p.basis, lang)} | ${
|
|
64048
|
+
`| ${p.name}${p.auth ? " \u{1F512}" : ""} | \`${p.url}\` | ${basisLabel(p.basis, lang)} | ${formatPageRate(rows, standard)} | ${nc.filter((f) => f.severity === "bloquant").length} | ${nc.filter((f) => f.severity === "majeur").length} | ${nc.filter((f) => f.severity === "mineur").length} | ${href ? `[${p.id}](${href})` : p.id} |`
|
|
63988
64049
|
);
|
|
63989
64050
|
}
|
|
63990
64051
|
out2.push("");
|
|
@@ -64501,23 +64562,6 @@ function reportCoverage(groups) {
|
|
|
64501
64562
|
const t3 = reportTotals(groups);
|
|
64502
64563
|
return { decided: t3.c + t3.nc, total: t3.c + t3.nc + t3.manual };
|
|
64503
64564
|
}
|
|
64504
|
-
function conformanceRate(t3) {
|
|
64505
|
-
const validated = Math.max(0, t3.c - t3.na);
|
|
64506
|
-
const applicable = validated + t3.nc + t3.manual;
|
|
64507
|
-
return {
|
|
64508
|
-
// No applicable criterion is not a failure — it is a scope with nothing of any kind in it,
|
|
64509
|
-
// and the repository's convention for an empty denominator is 100 (src/audit.ts
|
|
64510
|
-
// conformancePct). Divergent conventions on the same question is how two numbers describing
|
|
64511
|
-
// one grid start disagreeing.
|
|
64512
|
-
pct: applicable === 0 ? 100 : Math.round(validated / applicable * 100),
|
|
64513
|
-
validated,
|
|
64514
|
-
applicable,
|
|
64515
|
-
na: t3.na,
|
|
64516
|
-
open: t3.manual,
|
|
64517
|
-
decided: t3.c + t3.nc,
|
|
64518
|
-
total: t3.c + t3.nc + t3.manual
|
|
64519
|
-
};
|
|
64520
|
-
}
|
|
64521
64565
|
function averageConformanceRate(r, pages, standard, lang) {
|
|
64522
64566
|
const rated = pages.map((p) => {
|
|
64523
64567
|
const rate = conformanceRate(pageTally(pageCriterionRows(r, p, standard, lang)));
|
|
@@ -64779,8 +64823,7 @@ function renderPageRates(r, pages, standard, lang) {
|
|
|
64779
64823
|
out2.push("| --- | --- | --- | --- |");
|
|
64780
64824
|
for (const p of pages) {
|
|
64781
64825
|
const rows = pageCriterionRows(r, p, standard, lang);
|
|
64782
|
-
|
|
64783
|
-
out2.push(`| ${p.name}${p.auth ? " \u{1F512}" : ""} | \`${p.url}\` | ${basisLabel(p.basis, lang)} | ${formatRate(pageRatePct(rows), cov.decided, cov.total)} |`);
|
|
64826
|
+
out2.push(`| ${p.name}${p.auth ? " \u{1F512}" : ""} | \`${p.url}\` | ${basisLabel(p.basis, lang)} | ${formatPageRate(rows, standard)} |`);
|
|
64784
64827
|
}
|
|
64785
64828
|
out2.push("");
|
|
64786
64829
|
return out2;
|
|
@@ -65038,12 +65081,11 @@ function render(r, lang, opts) {
|
|
|
65038
65081
|
if (derivedPages.length) {
|
|
65039
65082
|
out2.push('<a id="page-rates"></a>', `## \u{1F4CB} ${s.pageRatesTitle}`, "", `> ${s.pageRatesNoteBusiness}${average ? s.conformanceColNote : ""}`, "");
|
|
65040
65083
|
const conf = average ? new Map(average.pages.map((p) => [p.id, p])) : void 0;
|
|
65041
|
-
out2.push(`| ${s.pageCol} | ${s.urlCol} | ${
|
|
65084
|
+
out2.push(`| ${s.pageCol} | ${s.urlCol} | ${conf ? s.conformanceCol : s.rateCol} |`, "| --- | --- | --- |");
|
|
65042
65085
|
for (const p of derivedPages) {
|
|
65043
65086
|
const criteria = pageCriterionRows(r, p, opts.standard, lang);
|
|
65044
|
-
const
|
|
65045
|
-
|
|
65046
|
-
out2.push(`| ${mdText(p.name)}${p.auth ? " \u{1F512}" : ""} | ${urlText(p.url)} | ${formatRate(pageRatePct(criteria), cov.decided, cov.total)} |${cell4}`);
|
|
65087
|
+
const cell4 = conf ? pageConformanceCell(conf.get(p.id)) : formatPageRate(criteria, opts.standard);
|
|
65088
|
+
out2.push(`| ${mdText(p.name)}${p.auth ? " \u{1F512}" : ""} | ${urlText(p.url)} | ${cell4} |`);
|
|
65047
65089
|
}
|
|
65048
65090
|
out2.push("");
|
|
65049
65091
|
}
|
|
@@ -75879,12 +75921,11 @@ function scoreboardBlocks(result, standard, lang, sheetHref) {
|
|
|
75879
75921
|
const derived = derivePages(result, scope);
|
|
75880
75922
|
const rows = derived.map((p) => {
|
|
75881
75923
|
const criteria = pageCriterionRows(result, p, standard, lang);
|
|
75882
|
-
const cov = pageCoverage(criteria);
|
|
75883
75924
|
return [
|
|
75884
75925
|
{ text: `${p.name}${p.auth ? " \u{1F512}" : ""}`, ...sheetHref ? { href: sheetHref(p.id) } : {} },
|
|
75885
75926
|
{ text: p.url, mono: true },
|
|
75886
75927
|
{ text: basisLabel(p.basis, lang) },
|
|
75887
|
-
{ text:
|
|
75928
|
+
{ text: formatPageRate(criteria, standard), align: "end" }
|
|
75888
75929
|
];
|
|
75889
75930
|
});
|
|
75890
75931
|
const out2 = [
|
|
@@ -75936,7 +75977,6 @@ function pageGridBlocks(result, page, standard, lang) {
|
|
|
75936
75977
|
const t3 = T4[lang];
|
|
75937
75978
|
const rows = pageCriterionRows(result, page, standard, lang);
|
|
75938
75979
|
if (!rows.length) return [];
|
|
75939
|
-
const cov = pageCoverage(rows);
|
|
75940
75980
|
const tally = pageTally(rows);
|
|
75941
75981
|
const table = { kind: "table", caption: t3.gridCaption(page.name), columns: [{ text: t3.criterion }, { text: t3.status }], rows: [] };
|
|
75942
75982
|
let group = "";
|
|
@@ -75953,7 +75993,7 @@ function pageGridBlocks(result, page, standard, lang) {
|
|
|
75953
75993
|
kind: "para",
|
|
75954
75994
|
runs: [
|
|
75955
75995
|
{ text: `${t3.pageRate} : `, strong: true },
|
|
75956
|
-
{ text:
|
|
75996
|
+
{ text: formatPageRate(rows, standard), strong: true }
|
|
75957
75997
|
]
|
|
75958
75998
|
},
|
|
75959
75999
|
{ kind: "para", runs: [{ text: t3.tally(tally.c, tally.nc, tally.na, tally.manual) }] },
|
|
@@ -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.3
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# review-a11y — accessibility review of changed code
|