ultra11y 5.58.1 → 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.
@@ -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.1",
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.1",
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.1",
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.1";
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
@@ -449,7 +449,10 @@ 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. And `pages --format report [--split page]` turns that into the **deliverable an
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, 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
453
456
  auditor hands over**: one dossier per page — identity, **screenshot**, rate, *every* criterion
454
457
  of the standard with its status on that page, then each non-conformity as the ordinary auditor
455
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.1",
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",
@@ -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.1";
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": {
@@ -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 decidedBy = c2.decidedBy ?? (measured2 ? "scan" : void 0);
62787
- const justification = measured2 ? measuredHereReason(c2.id, p.coverage) : c2.justification;
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,32 @@ function commonOrigin(pages) {
62904
62905
  function pageOriginNote(origin, lang) {
62905
62906
  return origin ? L[lang].originNote(origin) : void 0;
62906
62907
  }
62908
+ var NOTHING_ON_THIS_PAGE = "Nothing of this criterion's kind is present on this page.";
62909
+ function adjudicationOnPage(result, adjudication, page) {
62910
+ const stamped = new Set(page.findings.map(findingId));
62911
+ const sources = result.scope.pages?.find((p) => p.id === page.id)?.sources ?? [];
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
+ };
62919
+ const criteria = adjudication.criteria.flatMap((c2) => {
62920
+ if (c2.status === "C" && absentHere(c2.id)) return [{ ...c2, status: "NA", justification: NOTHING_ON_THIS_PAGE }];
62921
+ if (c2.status !== "NC") return [c2];
62922
+ const findings = c2.findings.filter(onPage);
62923
+ return findings.some((f) => !f.advisory) ? [{ ...c2, findings }] : [];
62924
+ });
62925
+ return { ...adjudication, criteria };
62926
+ }
62907
62927
  function pageView(result, page) {
62908
62928
  const own = result.scope.pageSubjects?.[page.id];
62929
+ const packAdjudication = result.packAdjudication ? adjudicationOnPage(result, result.packAdjudication, page) : void 0;
62909
62930
  return {
62910
62931
  ...result,
62911
62932
  ...own ? { scope: { ...result.scope, subjectsSeen: own } } : {},
62933
+ ...packAdjudication ? { packAdjudication } : {},
62912
62934
  criteria: page.criteria,
62913
62935
  findings: page.findings,
62914
62936
  ...result.packFindings ? { packFindings: result.packFindings.filter((f) => f.page === page.id) } : {},
@@ -62919,6 +62941,7 @@ function pageView(result, page) {
62919
62941
  function pageGridModel(result, derived, standard, lang) {
62920
62942
  const status = /* @__PURE__ */ new Map();
62921
62943
  const human = /* @__PURE__ */ new Set();
62944
+ const inapplicable = /* @__PURE__ */ new Set();
62922
62945
  const put = (rowId, pageId, s) => {
62923
62946
  const m = status.get(rowId) ?? /* @__PURE__ */ new Map();
62924
62947
  m.set(pageId, s);
@@ -62931,18 +62954,20 @@ function pageGridModel(result, derived, standard, lang) {
62931
62954
  put(c2.id, p.id, c2.status);
62932
62955
  if (c2.decidedBy === "human") human.add(`${c2.id}|${p.id}`);
62933
62956
  }
62934
- return { rows: rows2, status, human };
62957
+ return { rows: rows2, status, human, inapplicable };
62935
62958
  }
62936
62959
  const pack = loadPack(standard);
62937
62960
  const rows = pack.criteria.map((pc) => ({ id: pc.id, label: pc.id, group: `${pc.theme}. ${themeName(pack, pc.theme, lang) ?? ""}`.trim() }));
62938
62961
  for (const p of derived) {
62939
62962
  for (const pc of derivePackResults(pageView(result, p), standard, p.id)) {
62940
62963
  const criterion = pack.criteria.find((row) => row.id === pc.id);
62941
- put(pc.id, p.id, isProvisionalJudgmentInapplicable(pc, criterion) ? "manual" : pc.status);
62964
+ const provisional = isProvisionalJudgmentInapplicable(pc, criterion);
62965
+ put(pc.id, p.id, provisional ? "manual" : pc.status);
62942
62966
  if (pc.decidedBy === "human") human.add(`${pc.id}|${p.id}`);
62967
+ if (pc.inapplicable && !provisional) inapplicable.add(`${pc.id}|${p.id}`);
62943
62968
  }
62944
62969
  }
62945
- return { rows, status, human };
62970
+ return { rows, status, human, inapplicable };
62946
62971
  }
62947
62972
  function renderRedirected(redirected, lang = "en") {
62948
62973
  const fr = lang === "fr";
@@ -62958,16 +62983,24 @@ function renderRedirected(redirected, lang = "en") {
62958
62983
  }
62959
62984
  return out2;
62960
62985
  }
62961
- function gridRate(rows, status, pageId) {
62986
+ function gridRate(rows, status, pageId, inapplicable) {
62962
62987
  let c2 = 0;
62963
62988
  let nc = 0;
62989
+ let open = 0;
62990
+ let absent = 0;
62964
62991
  for (const row of rows) {
62965
62992
  const st = status.get(row.id)?.get(pageId);
62966
- if (st === "C") c2++;
62967
- else if (st === "NC") nc++;
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++;
62968
62998
  }
62969
62999
  const decided = c2 + nc;
62970
- 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];
62971
63004
  }
62972
63005
  function renderPageGrid(result, pages, standard = CORE2, lang = "en") {
62973
63006
  const s = L[lang];
@@ -62986,8 +63019,10 @@ function renderPageGrid(result, pages, standard = CORE2, lang = "en") {
62986
63019
  if (originNote) out2.push(`> ${originNote}`, "");
62987
63020
  const head = [s.criterion, ...derived.map((p) => pageColumnLabel(p, origin))];
62988
63021
  out2.push(`| ${head.join(" | ")} |`, `| ${head.map(() => "---").join(" | ")} |`);
62989
- const { rows, status, human } = pageGridModel(result, derived, standard, lang);
62990
- out2.push(`| **${s.rate}** | ${derived.map((p) => `**${formatRate(...gridRate(rows, status, p.id))}**`).join(" | ")} |`);
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
+ );
62991
63026
  out2.push(`| _${s.snapshot}?_ | ${derived.map((p) => `_${basisLabel(p.basis, lang)}_`).join(" | ")} |`);
62992
63027
  let group = "";
62993
63028
  let humanRuled = false;
@@ -63750,13 +63785,17 @@ var L4 = {
63750
63785
  producer: "Producteur",
63751
63786
  auth: "Authentification requise",
63752
63787
  rate: "Taux de r\xE9ussite automatique (v\xE9rifications statiques)",
63788
+ packRate: "Taux de conformit\xE9 de la page",
63753
63789
  // The index has its own, shorter header — the sheet's label is a full sentence and would
63754
63790
  // wreck an eight-column table. Kept as a SEPARATE key: editing `rate` in place would
63755
63791
  // silently reword the sheet bullet too.
63756
63792
  rateShort: "Taux (crit\xE8res d\xE9cid\xE9s)",
63793
+ packRateShort: "Taux (valid\xE9s \xF7 applicables)",
63757
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",
63758
63796
  tally: (c2, nc, na, m) => `${c2} conforme(s) \xB7 ${nc} non conforme(s) \xB7 ${na} non applicable(s) \xB7 ${m} \xE0 \xE9valuer`,
63759
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.`,
63760
63799
  tests: "Tests",
63761
63800
  screenshotAlt: (n) => `Capture d'\xE9cran de la page ${n}`,
63762
63801
  noScreenshot: "Aucune capture d'\xE9cran pour cette page (le producteur n'en a pas fourni) \u2014 le tier pixel est donc inactif ici.",
@@ -63775,7 +63814,8 @@ var L4 = {
63775
63814
  blocking: "Bloquant",
63776
63815
  major: "Majeur",
63777
63816
  minor: "Mineur",
63778
- 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."
63779
63819
  },
63780
63820
  en: {
63781
63821
  docTitle: "Page-by-page accessibility report",
@@ -63793,10 +63833,14 @@ var L4 = {
63793
63833
  producer: "Producer",
63794
63834
  auth: "Authentication required",
63795
63835
  rate: "Automatic static-check pass rate",
63836
+ packRate: "Page conformance rate",
63796
63837
  rateShort: "Rate (decided criteria)",
63838
+ packRateShort: "Rate (validated \xF7 applicable)",
63797
63839
  rateNote: "decidable subset: C \xF7 (C + NC)",
63840
+ packRateNote: "validated criteria \xF7 applicable criteria, those still to assess counting in the denominator",
63798
63841
  tally: (c2, nc, na, m) => `${c2} conforming \xB7 ${nc} non-conforming \xB7 ${na} not applicable \xB7 ${m} to assess`,
63799
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.`,
63800
63844
  tests: "Tests",
63801
63845
  screenshotAlt: (n) => `Screenshot of the ${n} page`,
63802
63846
  noScreenshot: "No screenshot for this page (the producer supplied none) \u2014 the pixel tier is therefore inactive here.",
@@ -63815,7 +63859,8 @@ var L4 = {
63815
63859
  blocking: "Blocking",
63816
63860
  major: "Major",
63817
63861
  minor: "Minor",
63818
- 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."
63819
63864
  }
63820
63865
  };
63821
63866
  function pageCriterionRows(result, page, standard, lang) {
@@ -63860,7 +63905,7 @@ function pagesForStandard(result, pages, standard, lang) {
63860
63905
  findings: [],
63861
63906
  ...r.decidedBy ? { decidedBy: r.decidedBy } : {}
63862
63907
  })),
63863
- conformancePct: pageRatePct(rows),
63908
+ conformancePct: pageRatePct(rows, standard),
63864
63909
  decided: cov.decided,
63865
63910
  total: cov.total
63866
63911
  };
@@ -63884,9 +63929,36 @@ function pageCoverage(rows) {
63884
63929
  const t3 = pageTally(rows);
63885
63930
  return { decided: t3.c + t3.nc, total: rows.length };
63886
63931
  }
63887
- function pageRatePct(rows) {
63888
- const { c: c2, nc } = pageTally(rows);
63889
- return c2 + nc === 0 ? null : Math.round(c2 / (c2 + nc) * 100);
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);
63890
63962
  }
63891
63963
  function renderPageReport(result, page, opts = {}) {
63892
63964
  const standard = opts.standard ?? CORE2;
@@ -63903,10 +63975,13 @@ function renderPageReport(result, page, opts = {}) {
63903
63975
  const rows = pageCriterionRows(result, page, standard, lang);
63904
63976
  const t3 = pageTally(rows);
63905
63977
  const cov = pageCoverage(rows);
63906
- const rate = pageRatePct(rows);
63907
- out2.push(`- **${s.rate}** : **${rate === null ? "\u2014" : `${rate} %`}** _(${s.rateNote})_`);
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
+ );
63908
63983
  out2.push(`- ${pageTallyNote(t3, lang)}`);
63909
- out2.push(`- ${s.coverage(cov.decided, cov.total)}`, "");
63984
+ out2.push(`- ${(pack ? s.packCoverage : s.coverage)(cov.decided, cov.total)}`, "");
63910
63985
  if (page.basis !== "snapshot") out2.push(`> \u26A0\uFE0F ${page.basis === "loading" ? pageBasisWarning("loading", lang) : s.sourceWarn}`, "");
63911
63986
  const shot = opts.screenshots?.get(page.id);
63912
63987
  if (shot) out2.push(`![${s.screenshotAlt(page.name)}](${shot})`, "");
@@ -63961,16 +64036,16 @@ function renderPagesIndex(result, pages, opts = {}) {
63961
64036
  const lang = opts.lang ?? "en";
63962
64037
  const s = L4[lang];
63963
64038
  const out2 = header2(result, pages, standard, lang, s.indexTitle);
63964
- out2.push(`> ${s.indexNote}`, "");
63965
- out2.push(`| ${s.page} | ${s.url} | ${s.basis} | ${s.rateShort} | ${s.blocking} | ${s.major} | ${s.minor} | ${s.sheet} |`);
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} |`);
63966
64042
  out2.push("| --- | --- | --- | --- | --- | --- | --- | --- |");
63967
64043
  for (const p of pages) {
63968
64044
  const rows = pageCriterionRows(result, p, standard, lang);
63969
- const cov = pageCoverage(rows);
63970
64045
  const nc = [...p.findings, ...(result.packFindings ?? []).filter((f) => f.page === p.id)].filter((f) => !f.advisory);
63971
64046
  const href = opts.hrefs?.get(p.id);
63972
64047
  out2.push(
63973
- `| ${p.name}${p.auth ? " \u{1F512}" : ""} | \`${p.url}\` | ${basisLabel(p.basis, lang)} | ${formatRate(pageRatePct(rows), cov.decided, cov.total)} | ${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} |`
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} |`
63974
64049
  );
63975
64050
  }
63976
64051
  out2.push("");
@@ -64487,23 +64562,6 @@ function reportCoverage(groups) {
64487
64562
  const t3 = reportTotals(groups);
64488
64563
  return { decided: t3.c + t3.nc, total: t3.c + t3.nc + t3.manual };
64489
64564
  }
64490
- function conformanceRate(t3) {
64491
- const validated = Math.max(0, t3.c - t3.na);
64492
- const applicable = validated + t3.nc + t3.manual;
64493
- return {
64494
- // No applicable criterion is not a failure — it is a scope with nothing of any kind in it,
64495
- // and the repository's convention for an empty denominator is 100 (src/audit.ts
64496
- // conformancePct). Divergent conventions on the same question is how two numbers describing
64497
- // one grid start disagreeing.
64498
- pct: applicable === 0 ? 100 : Math.round(validated / applicable * 100),
64499
- validated,
64500
- applicable,
64501
- na: t3.na,
64502
- open: t3.manual,
64503
- decided: t3.c + t3.nc,
64504
- total: t3.c + t3.nc + t3.manual
64505
- };
64506
- }
64507
64565
  function averageConformanceRate(r, pages, standard, lang) {
64508
64566
  const rated = pages.map((p) => {
64509
64567
  const rate = conformanceRate(pageTally(pageCriterionRows(r, p, standard, lang)));
@@ -64765,8 +64823,7 @@ function renderPageRates(r, pages, standard, lang) {
64765
64823
  out2.push("| --- | --- | --- | --- |");
64766
64824
  for (const p of pages) {
64767
64825
  const rows = pageCriterionRows(r, p, standard, lang);
64768
- const cov = pageCoverage(rows);
64769
- 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)} |`);
64770
64827
  }
64771
64828
  out2.push("");
64772
64829
  return out2;
@@ -65024,12 +65081,11 @@ function render(r, lang, opts) {
65024
65081
  if (derivedPages.length) {
65025
65082
  out2.push('<a id="page-rates"></a>', `## \u{1F4CB} ${s.pageRatesTitle}`, "", `> ${s.pageRatesNoteBusiness}${average ? s.conformanceColNote : ""}`, "");
65026
65083
  const conf = average ? new Map(average.pages.map((p) => [p.id, p])) : void 0;
65027
- out2.push(`| ${s.pageCol} | ${s.urlCol} | ${s.rateCol} |${conf ? ` ${s.conformanceCol} |` : ""}`, `| --- | --- | --- |${conf ? " --- |" : ""}`);
65084
+ out2.push(`| ${s.pageCol} | ${s.urlCol} | ${conf ? s.conformanceCol : s.rateCol} |`, "| --- | --- | --- |");
65028
65085
  for (const p of derivedPages) {
65029
65086
  const criteria = pageCriterionRows(r, p, opts.standard, lang);
65030
- const cov = pageCoverage(criteria);
65031
- const cell4 = conf ? ` ${pageConformanceCell(conf.get(p.id))} |` : "";
65032
- 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} |`);
65033
65089
  }
65034
65090
  out2.push("");
65035
65091
  }
@@ -75865,12 +75921,11 @@ function scoreboardBlocks(result, standard, lang, sheetHref) {
75865
75921
  const derived = derivePages(result, scope);
75866
75922
  const rows = derived.map((p) => {
75867
75923
  const criteria = pageCriterionRows(result, p, standard, lang);
75868
- const cov = pageCoverage(criteria);
75869
75924
  return [
75870
75925
  { text: `${p.name}${p.auth ? " \u{1F512}" : ""}`, ...sheetHref ? { href: sheetHref(p.id) } : {} },
75871
75926
  { text: p.url, mono: true },
75872
75927
  { text: basisLabel(p.basis, lang) },
75873
- { text: formatRate(pageRatePct(criteria), cov.decided, cov.total), align: "end" }
75928
+ { text: formatPageRate(criteria, standard), align: "end" }
75874
75929
  ];
75875
75930
  });
75876
75931
  const out2 = [
@@ -75922,7 +75977,6 @@ function pageGridBlocks(result, page, standard, lang) {
75922
75977
  const t3 = T4[lang];
75923
75978
  const rows = pageCriterionRows(result, page, standard, lang);
75924
75979
  if (!rows.length) return [];
75925
- const cov = pageCoverage(rows);
75926
75980
  const tally = pageTally(rows);
75927
75981
  const table = { kind: "table", caption: t3.gridCaption(page.name), columns: [{ text: t3.criterion }, { text: t3.status }], rows: [] };
75928
75982
  let group = "";
@@ -75939,7 +75993,7 @@ function pageGridBlocks(result, page, standard, lang) {
75939
75993
  kind: "para",
75940
75994
  runs: [
75941
75995
  { text: `${t3.pageRate} : `, strong: true },
75942
- { text: formatRate(pageRatePct(rows), cov.decided, cov.total), strong: true }
75996
+ { text: formatPageRate(rows, standard), strong: true }
75943
75997
  ]
75944
75998
  },
75945
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.1
6
+ version: 5.58.3
7
7
  ---
8
8
 
9
9
  # review-a11y — accessibility review of changed code