ultra11y 5.57.2 → 5.57.4
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/dist/cypress-plugin.d.ts +1 -1
- package/dist/cypress.d.ts +2 -2
- package/dist/cypress.mjs +33 -2
- package/dist/{payload-BMFQTm5s.d.ts → payload-BrdH5eEV.d.ts} +11 -1
- package/dist/playwright.d.ts +7 -1
- package/dist/playwright.mjs +69 -3
- package/docker/runner.mjs +16 -1
- package/package.json +1 -1
- package/scripts/ultra11y.mjs +189 -36
- package/skills/review-a11y/SKILL.md +1 -1
- package/skills/review-a11y/scripts/ultra11y.mjs +189 -36
- package/skills/ultra11y/SKILL.md +1 -1
- package/skills/ultra11y/references/e2e.md +20 -1
- package/skills/ultra11y/references/mcp.md +2 -1
- package/skills/ultra11y/references/orchestrators.md +7 -5
- package/skills/ultra11y/references/pages.md +3 -2
- package/skills/ultra11y/references/verify.md +5 -1
- package/skills/ultra11y/scripts/ultra11y.mjs +189 -36
- package/skills/ultra11y/templates/gitlab-ci.yml +1 -1
- package/src/adjudicate.ts +53 -9
- package/src/audit.ts +17 -7
- package/src/cli.ts +29 -5
- package/src/collector.ts +79 -0
- package/src/dev.ts +11 -1
- package/src/e2e.ts +2 -0
- package/src/html-report.ts +1 -1
- package/src/integrations/payload.ts +27 -2
- package/src/integrations/playwright.ts +32 -4
- package/src/mcp/handlers.ts +1 -0
- package/src/mcp/tools.ts +2 -1
- package/src/pages-report.ts +4 -2
- package/src/pages.ts +13 -4
- package/src/report.ts +4 -2
- package/src/scan-local.ts +27 -2
- package/src/scan.ts +24 -1
- package/src/snapshot.ts +55 -3
- package/src/types.ts +9 -2
package/scripts/ultra11y.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { join as join56, relative as relative7, resolve as resolve19, 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.57.
|
|
9
|
+
var VERSION = "5.57.4";
|
|
10
10
|
var SCHEMA_VERSION = 2;
|
|
11
11
|
function isAdjudicated(by) {
|
|
12
12
|
return by === "agent" || by === "human";
|
|
@@ -38655,6 +38655,44 @@ var COLLECTED_CSS = [
|
|
|
38655
38655
|
"cursor"
|
|
38656
38656
|
];
|
|
38657
38657
|
var COLLECT_MAX_ELEMENTS = 5e3;
|
|
38658
|
+
var LOADING_STATE = `(() => {
|
|
38659
|
+
const out = [];
|
|
38660
|
+
const shown = (e) => {
|
|
38661
|
+
const r = e.getBoundingClientRect();
|
|
38662
|
+
if (r.width <= 0 && r.height <= 0) return false;
|
|
38663
|
+
const s = getComputedStyle(e);
|
|
38664
|
+
return s.display !== 'none' && s.visibility !== 'hidden';
|
|
38665
|
+
};
|
|
38666
|
+
const name = (e) => e.localName + (e.id ? '#' + e.id : '');
|
|
38667
|
+
for (const e of Array.from(document.querySelectorAll('[aria-busy="true"]'))) if (shown(e)) out.push('aria-busy="true" ' + name(e));
|
|
38668
|
+
for (const e of Array.from(document.querySelectorAll('[role="progressbar"]:not([aria-valuenow]), progress:not([value])'))) if (shown(e)) out.push('indeterminate progress ' + name(e));
|
|
38669
|
+
const PHRASE = /^(chargement( en cours)?|veuillez patienter|loading|please wait)\\s*(\\.{1,3}|\u2026)?$/i;
|
|
38670
|
+
const text = (e) => (e.textContent || '').replace(/\\s+/g, ' ').trim();
|
|
38671
|
+
if (document.body) for (const e of Array.from(document.body.querySelectorAll('p,span,div,li,h1,h2,h3,h4,h5,h6,strong,em,output,[role="status"]'))) {
|
|
38672
|
+
const t = text(e);
|
|
38673
|
+
if (t.length > 40 || !PHRASE.test(t)) continue;
|
|
38674
|
+
if (Array.from(e.children).some((c) => PHRASE.test(text(c)))) continue;
|
|
38675
|
+
if (shown(e)) out.push('text "' + t + '" ' + name(e));
|
|
38676
|
+
}
|
|
38677
|
+
return out.slice(0, 10);
|
|
38678
|
+
})()`;
|
|
38679
|
+
async function waitForLoaded(page, timeoutMs, intervalMs = 150) {
|
|
38680
|
+
const started = Date.now();
|
|
38681
|
+
for (; ; ) {
|
|
38682
|
+
let markers = [];
|
|
38683
|
+
try {
|
|
38684
|
+
const r = await page.evaluate(LOADING_STATE);
|
|
38685
|
+
markers = Array.isArray(r) ? r.filter((m) => typeof m === "string") : [];
|
|
38686
|
+
} catch {
|
|
38687
|
+
return { markers: [], waitedMs: Date.now() - started };
|
|
38688
|
+
}
|
|
38689
|
+
const waitedMs = Date.now() - started;
|
|
38690
|
+
if (!markers.length || waitedMs >= timeoutMs) return { markers, waitedMs };
|
|
38691
|
+
await new Promise((resolve20) => setTimeout(resolve20, Math.min(intervalMs, Math.max(1, timeoutMs - waitedMs))));
|
|
38692
|
+
}
|
|
38693
|
+
}
|
|
38694
|
+
var LOADING_TIMEOUT_MS = 1e4;
|
|
38695
|
+
var FULL_SCREENSHOT_MAX_HEIGHT = 8e3;
|
|
38658
38696
|
var COLLECT_SNAPSHOT = `(() => {
|
|
38659
38697
|
const PROPS = ${JSON.stringify(COLLECTED_CSS)};
|
|
38660
38698
|
const MAX = ${COLLECT_MAX_ELEMENTS};
|
|
@@ -38766,6 +38804,12 @@ var COLLECT_SNAPSHOT = `(() => {
|
|
|
38766
38804
|
lang: document.documentElement.getAttribute('lang') || '',
|
|
38767
38805
|
url: location.href,
|
|
38768
38806
|
viewport: { width: window.innerWidth, height: window.innerHeight },
|
|
38807
|
+
// The document's full height, so the producer knows whether a full-page screenshot adds
|
|
38808
|
+
// anything to the viewport one.
|
|
38809
|
+
docHeight: Math.max(document.documentElement.scrollHeight, document.body ? document.body.scrollHeight : 0),
|
|
38810
|
+
// Still loading at the instant of collection: the markers, or none. Every producer runs
|
|
38811
|
+
// this same collector, so every producer can say so \u2014 see LOADING_STATE.
|
|
38812
|
+
loading: ${LOADING_STATE},
|
|
38769
38813
|
styles: { v: 1, entries: styles, truncated: truncated },
|
|
38770
38814
|
boxes: { v: 1, entries: boxes, truncated: truncated }
|
|
38771
38815
|
};
|
|
@@ -38810,6 +38854,8 @@ function validateSnapshotMeta(raw) {
|
|
|
38810
38854
|
if (m.route !== void 0 && typeof m.route !== "string") err2("meta.route", "route must be a string");
|
|
38811
38855
|
if (m.notes !== void 0 && typeof m.notes !== "string") err2("meta.notes", "notes must be a string");
|
|
38812
38856
|
if (m.doctype !== void 0 && typeof m.doctype !== "string") err2("meta.doctype", "doctype must be a string");
|
|
38857
|
+
if (m.loading !== void 0 && (!Array.isArray(m.loading) || m.loading.some((s) => typeof s !== "string")))
|
|
38858
|
+
err2("meta.loading", "loading must be an array of strings");
|
|
38813
38859
|
if (m.sources !== void 0 && (!Array.isArray(m.sources) || m.sources.some((s) => typeof s !== "string")))
|
|
38814
38860
|
err2("meta.sources", "sources must be an array of strings");
|
|
38815
38861
|
if (issues.length) return { ok: false, issues };
|
|
@@ -38835,7 +38881,9 @@ function validateSnapshotMeta(raw) {
|
|
|
38835
38881
|
// it does not name, so adding a field to the type is only ever half the change.
|
|
38836
38882
|
...typeof m.doctype === "string" ? { doctype: m.doctype } : {},
|
|
38837
38883
|
...Array.isArray(m.sources) ? { sources: m.sources } : {},
|
|
38838
|
-
...typeof m.notes === "string" ? { notes: m.notes } : {}
|
|
38884
|
+
...typeof m.notes === "string" ? { notes: m.notes } : {},
|
|
38885
|
+
// Kept only when it says something: an empty list is a page that was ready.
|
|
38886
|
+
...Array.isArray(m.loading) && m.loading.length ? { loading: m.loading } : {}
|
|
38839
38887
|
}
|
|
38840
38888
|
};
|
|
38841
38889
|
}
|
|
@@ -38875,6 +38923,12 @@ ${snap.dom}
|
|
|
38875
38923
|
} catch {
|
|
38876
38924
|
}
|
|
38877
38925
|
}
|
|
38926
|
+
if (snap.screenshotFullBase64) {
|
|
38927
|
+
try {
|
|
38928
|
+
writeFileSync5(join24(dir, "screen-full.png"), Buffer.from(snap.screenshotFullBase64, "base64"));
|
|
38929
|
+
} catch {
|
|
38930
|
+
}
|
|
38931
|
+
}
|
|
38878
38932
|
return dir;
|
|
38879
38933
|
}
|
|
38880
38934
|
function readJson2(file) {
|
|
@@ -38902,6 +38956,7 @@ function readSnapshot(dir) {
|
|
|
38902
38956
|
const probes = readJson2(join24(dir, "probes.json"));
|
|
38903
38957
|
const axe = readJson2(join24(dir, "axe.json"));
|
|
38904
38958
|
const shot = join24(dir, "screen.png");
|
|
38959
|
+
const full = join24(dir, "screen-full.png");
|
|
38905
38960
|
return {
|
|
38906
38961
|
meta: v.meta,
|
|
38907
38962
|
dom,
|
|
@@ -38911,9 +38966,17 @@ function readSnapshot(dir) {
|
|
|
38911
38966
|
...css ? { css } : {},
|
|
38912
38967
|
...probes ? { probes } : {},
|
|
38913
38968
|
...axe ? { axe } : {},
|
|
38914
|
-
...existsSync13(shot) ? { screenshot: "screen.png" } : {}
|
|
38969
|
+
...existsSync13(shot) ? { screenshot: "screen.png" } : {},
|
|
38970
|
+
...existsSync13(full) ? { screenshotFull: "screen-full.png" } : {}
|
|
38915
38971
|
};
|
|
38916
38972
|
}
|
|
38973
|
+
function pageScreenshot(pagesDir, id) {
|
|
38974
|
+
for (const f of ["screen-full.png", "screen.png"]) {
|
|
38975
|
+
const p = join24(pagesDir, id, f);
|
|
38976
|
+
if (existsSync13(p)) return p;
|
|
38977
|
+
}
|
|
38978
|
+
return void 0;
|
|
38979
|
+
}
|
|
38917
38980
|
function readSnapshots(root) {
|
|
38918
38981
|
const base = join24(root, PAGES_DIR);
|
|
38919
38982
|
let dirs;
|
|
@@ -38971,6 +39034,7 @@ function attachSignals(doc) {
|
|
|
38971
39034
|
const axtree = readJson2(join24(dir, "axtree.json"));
|
|
38972
39035
|
const css = readJson2(join24(dir, "css.json"));
|
|
38973
39036
|
const meta2 = readJson2(join24(dir, "meta.json"));
|
|
39037
|
+
const loading = Array.isArray(meta2?.loading) ? meta2.loading.filter((m) => typeof m === "string") : [];
|
|
38974
39038
|
const probes = readJson2(join24(dir, "probes.json"));
|
|
38975
39039
|
const axe = readJson2(join24(dir, "axe.json"));
|
|
38976
39040
|
const shot = join24(dir, "screen.png");
|
|
@@ -38987,7 +39051,8 @@ function attachSignals(doc) {
|
|
|
38987
39051
|
...meta2?.doctype !== void 0 ? { doctype: meta2.doctype } : {},
|
|
38988
39052
|
...probes ? { probes } : {},
|
|
38989
39053
|
...axe ? { axe } : {},
|
|
38990
|
-
...truncated ? { truncated } : {}
|
|
39054
|
+
...truncated ? { truncated } : {},
|
|
39055
|
+
...loading.length ? { capturedLoading: loading } : {}
|
|
38991
39056
|
};
|
|
38992
39057
|
if (Object.keys(signals).length) doc.signals = signals;
|
|
38993
39058
|
}
|
|
@@ -57028,15 +57093,18 @@ function foldDoc(acc, doc, graph) {
|
|
|
57028
57093
|
const pageId = snapshotPageId(doc.file);
|
|
57029
57094
|
if (pageId) {
|
|
57030
57095
|
acc.pageIds.add(pageId);
|
|
57031
|
-
const
|
|
57032
|
-
|
|
57033
|
-
|
|
57034
|
-
|
|
57096
|
+
const placeholder = Boolean(doc.signals?.capturedLoading?.length);
|
|
57097
|
+
if (!placeholder) {
|
|
57098
|
+
const own = acc.pageSubjects.get(pageId) ?? /* @__PURE__ */ new Set();
|
|
57099
|
+
for (const id of subjectsPresentIn(doc, own)) own.add(id);
|
|
57100
|
+
acc.pageSubjects.set(pageId, own);
|
|
57101
|
+
}
|
|
57102
|
+
for (const ruleId of placeholder ? [] : renderedRulesRan(doc.signals)) {
|
|
57035
57103
|
const seen = acc.renderedRan.get(ruleId) ?? /* @__PURE__ */ new Set();
|
|
57036
57104
|
seen.add(pageId);
|
|
57037
57105
|
acc.renderedRan.set(ruleId, seen);
|
|
57038
57106
|
}
|
|
57039
|
-
for (const pack of listPacks()) {
|
|
57107
|
+
for (const pack of placeholder ? [] : listPacks()) {
|
|
57040
57108
|
for (const rule of pack.rules ?? []) {
|
|
57041
57109
|
if (!docRuleRan(doc, rule)) continue;
|
|
57042
57110
|
const id = `pack:${pack.key}:${rule.id}`;
|
|
@@ -57048,7 +57116,7 @@ function foldDoc(acc, doc, graph) {
|
|
|
57048
57116
|
const probes = doc.signals?.probes;
|
|
57049
57117
|
if (probes) {
|
|
57050
57118
|
const trusted = (probes.v ?? 1) >= PROBES_VERSION;
|
|
57051
|
-
for (const sc of probes.probed ?? []) {
|
|
57119
|
+
for (const sc of placeholder ? [] : probes.probed ?? []) {
|
|
57052
57120
|
if (!trusted && WALK_DEPENDENT_SCS.includes(sc)) continue;
|
|
57053
57121
|
const seen = acc.probedScs.get(sc) ?? /* @__PURE__ */ new Set();
|
|
57054
57122
|
seen.add(pageId);
|
|
@@ -57064,7 +57132,7 @@ function foldDoc(acc, doc, graph) {
|
|
|
57064
57132
|
}
|
|
57065
57133
|
const axe = doc.signals?.axe;
|
|
57066
57134
|
if (axe?.ran) {
|
|
57067
|
-
acc.axeRan.add(pageId);
|
|
57135
|
+
if (!placeholder) acc.axeRan.add(pageId);
|
|
57068
57136
|
for (const sc of Object.keys(AXE_DECIDES)) acc.renderedScs.add(sc);
|
|
57069
57137
|
for (const f of axeFindings(axe.violations ?? [], doc.file, pageId)) {
|
|
57070
57138
|
const list = acc.byCriterion.get(f.criteriaId) ?? [];
|
|
@@ -62471,7 +62539,9 @@ function pageScopesFrom(snapshots) {
|
|
|
62471
62539
|
...s.meta.route ? { route: s.meta.route } : {},
|
|
62472
62540
|
...s.meta.sources ? { sources: s.meta.sources } : {},
|
|
62473
62541
|
...s.meta.notes ? { notes: s.meta.notes } : {},
|
|
62474
|
-
|
|
62542
|
+
// A capture taken while the page still declared itself loading is a snapshot of a
|
|
62543
|
+
// placeholder: real findings, no conformity by silence (see PageScope.basis).
|
|
62544
|
+
basis: s.meta.loading?.length ? "loading" : "snapshot"
|
|
62475
62545
|
}));
|
|
62476
62546
|
}
|
|
62477
62547
|
function pageScopesFromSample(sample) {
|
|
@@ -62651,6 +62721,8 @@ var L = {
|
|
|
62651
62721
|
source: "source",
|
|
62652
62722
|
notAudited: "non audit\xE9",
|
|
62653
62723
|
notAuditedNote: "Une page marqu\xE9e \xAB non audit\xE9 \xBB a bien un instantan\xE9, mais CET audit ne l'a pas lu (il ne portait que sur les sources). L'absence de constat n'y vaut donc PAS conformit\xE9 \u2014 relancez l'audit en incluant `.ultra11y/pages`.",
|
|
62724
|
+
loading: "capture en \xE9tat de chargement",
|
|
62725
|
+
loadingNote: "Une page marqu\xE9e \xAB capture en \xE9tat de chargement \xBB a \xE9t\xE9 enregistr\xE9e alors qu'elle s'annon\xE7ait encore en cours de chargement (`aria-busy`, indicateur de progression, \xAB Chargement\u2026 \xBB) : son contenu n'\xE9tait pas affich\xE9. Ses constats sont r\xE9els, mais l'absence de constat n'y vaut PAS conformit\xE9 \u2014 recapturez-la une fois charg\xE9e.",
|
|
62654
62726
|
agentMark: "`C*` : conformit\xE9 tranch\xE9e par l'agent IA \xE0 partir des \xE9vidences cit\xE9es (gat\xE9), et non prouv\xE9e par le moteur d\xE9terministe.",
|
|
62655
62727
|
humanMark: "`C\u2020` : conformit\xE9 tranch\xE9e par un auditeur humain nomm\xE9 \xE0 partir des \xE9vidences cit\xE9es (m\xEAme gate que l'agent), et non prouv\xE9e par le moteur d\xE9terministe.",
|
|
62656
62728
|
originNote: (o) => `Les colonnes sont les URL des pages, relatives \xE0 \`${o}\`.`
|
|
@@ -62668,6 +62740,8 @@ var L = {
|
|
|
62668
62740
|
source: "source",
|
|
62669
62741
|
notAudited: "not audited",
|
|
62670
62742
|
notAuditedNote: 'A page marked "not audited" does have a snapshot, but THIS audit never read it (it covered sources only). Absence of a finding there does NOT mean conforming \u2014 re-run the audit with `.ultra11y/pages` in scope.',
|
|
62743
|
+
loading: "captured while loading",
|
|
62744
|
+
loadingNote: 'A page marked "captured while loading" was recorded while it still declared itself loading (`aria-busy`, a progress indicator, \xAB Loading\u2026 \xBB): its content was not on screen. Its findings are real, but absence of a finding there does NOT mean conforming \u2014 capture it again once it has loaded.',
|
|
62671
62745
|
agentMark: "`C*`: conformity ruled by the AI agent from the evidence it cited (gated), not proven by the deterministic engine.",
|
|
62672
62746
|
humanMark: "`C\u2020`: conformity ruled by a named human auditor from the evidence they cited (the agent's gate), not proven by the deterministic engine.",
|
|
62673
62747
|
originNote: (o) => `Columns are the pages' URLs, relative to \`${o}\`.`
|
|
@@ -62688,11 +62762,11 @@ function ruledMark(decidedBy, status) {
|
|
|
62688
62762
|
}
|
|
62689
62763
|
function pageBasisWarning(basis, lang) {
|
|
62690
62764
|
if (basis === "snapshot") return void 0;
|
|
62691
|
-
return basis === "not-audited" ? L[lang].notAuditedNote : L[lang].basisNote;
|
|
62765
|
+
return basis === "not-audited" ? L[lang].notAuditedNote : basis === "loading" ? L[lang].loadingNote : L[lang].basisNote;
|
|
62692
62766
|
}
|
|
62693
62767
|
function basisLabel(basis, lang) {
|
|
62694
62768
|
const s = L[lang];
|
|
62695
|
-
return basis === "snapshot" ? s.snapshot : basis === "not-audited" ? s.notAudited : s.source;
|
|
62769
|
+
return basis === "snapshot" ? s.snapshot : basis === "not-audited" ? s.notAudited : basis === "loading" ? s.loading : s.source;
|
|
62696
62770
|
}
|
|
62697
62771
|
function unattributedNote(n, lang) {
|
|
62698
62772
|
return L[lang].unattributed(n);
|
|
@@ -62799,6 +62873,7 @@ function renderPageGrid(result, pages, standard = CORE2, lang = "en") {
|
|
|
62799
62873
|
}
|
|
62800
62874
|
out2.push(`> ${s.note}`, "");
|
|
62801
62875
|
if (derived.some((p) => p.basis === "attributed")) out2.push(`> \u26A0\uFE0F ${s.basisNote}`, "");
|
|
62876
|
+
if (derived.some((p) => p.basis === "loading")) out2.push(`> \u26A0\uFE0F ${s.loadingNote}`, "");
|
|
62802
62877
|
const origin = commonOrigin(derived);
|
|
62803
62878
|
const originNote = pageOriginNote(origin, lang);
|
|
62804
62879
|
if (originNote) out2.push(`> ${originNote}`, "");
|
|
@@ -63725,7 +63800,7 @@ function renderPageReport(result, page, opts = {}) {
|
|
|
63725
63800
|
out2.push(`- **${s.rate}** : **${rate === null ? "\u2014" : `${rate} %`}** _(${s.rateNote})_`);
|
|
63726
63801
|
out2.push(`- ${pageTallyNote(t3, lang)}`);
|
|
63727
63802
|
out2.push(`- ${s.coverage(cov.decided, cov.total)}`, "");
|
|
63728
|
-
if (page.basis !== "snapshot") out2.push(`> \u26A0\uFE0F ${s.sourceWarn}`, "");
|
|
63803
|
+
if (page.basis !== "snapshot") out2.push(`> \u26A0\uFE0F ${page.basis === "loading" ? pageBasisWarning("loading", lang) : s.sourceWarn}`, "");
|
|
63729
63804
|
const shot = opts.screenshots?.get(page.id);
|
|
63730
63805
|
if (shot) out2.push(``, "");
|
|
63731
63806
|
else out2.push(`_${s.noScreenshot}_`, "");
|
|
@@ -64869,7 +64944,7 @@ function render(r, lang, opts) {
|
|
|
64869
64944
|
out2.push(`- ${s.pageNcCriteria(failing.length)}${adv.length ? ` \xB7 ${adv.length} ${s.advCount}` : ""}`);
|
|
64870
64945
|
const notes = pageScope.find((x) => x.id === pg.id)?.notes;
|
|
64871
64946
|
if (notes) out2.push(`- _${notes}_`);
|
|
64872
|
-
const shot = join33(PAGES_DIR, pg.id, "screen.png");
|
|
64947
|
+
const shot = pageScreenshot(PAGES_DIR, pg.id) ?? join33(PAGES_DIR, pg.id, "screen.png");
|
|
64873
64948
|
if (existsSync22(shot)) {
|
|
64874
64949
|
let href = relative4(opts.outDir ?? ".", shot).split("\\").join("/");
|
|
64875
64950
|
if (opts.outDir) {
|
|
@@ -68627,6 +68702,11 @@ function applyAdjudication(audit2, adj, opts = {}) {
|
|
|
68627
68702
|
else itemIssues.set(criteriaId, [issue]);
|
|
68628
68703
|
};
|
|
68629
68704
|
const uncovered = (criteriaId) => notFolded.add(criteriaId);
|
|
68705
|
+
const gapIssues = /* @__PURE__ */ new Map();
|
|
68706
|
+
const gap = (criteriaId) => {
|
|
68707
|
+
notFolded.add(criteriaId);
|
|
68708
|
+
gapIssues.set(criteriaId, `criterion ${criteriaId}: missing from the adjudication (coverage gap)`);
|
|
68709
|
+
};
|
|
68630
68710
|
canonicalizeAdjudication(adj);
|
|
68631
68711
|
const itemCounts = /* @__PURE__ */ new Map();
|
|
68632
68712
|
for (const item of adj.items) itemCounts.set(item.criteriaId, (itemCounts.get(item.criteriaId) ?? 0) + 1);
|
|
@@ -68642,14 +68722,14 @@ function applyAdjudication(audit2, adj, opts = {}) {
|
|
|
68642
68722
|
open.add(item.criteriaId);
|
|
68643
68723
|
if (byId2.has(item.criteriaId)) continue;
|
|
68644
68724
|
if (Object.hasOwn(expected, item.criteriaId)) uncovered(item.criteriaId);
|
|
68645
|
-
else
|
|
68725
|
+
else gap(item.criteriaId);
|
|
68646
68726
|
}
|
|
68647
68727
|
} else {
|
|
68648
68728
|
for (const r of audit2.residualRisks) {
|
|
68649
68729
|
open.add(r.criteriaId);
|
|
68650
68730
|
if (byId2.has(r.criteriaId)) continue;
|
|
68651
68731
|
if (Object.hasOwn(expected, r.criteriaId)) uncovered(r.criteriaId);
|
|
68652
|
-
else
|
|
68732
|
+
else gap(r.criteriaId);
|
|
68653
68733
|
}
|
|
68654
68734
|
}
|
|
68655
68735
|
for (const it of adj.items) {
|
|
@@ -68832,13 +68912,25 @@ function applyAdjudication(audit2, adj, opts = {}) {
|
|
|
68832
68912
|
}
|
|
68833
68913
|
}
|
|
68834
68914
|
}
|
|
68835
|
-
|
|
68836
|
-
|
|
68915
|
+
const notInWorklist = [...gapIssues.keys()];
|
|
68916
|
+
if (opts.strict && (issues.length || notInWorklist.length)) {
|
|
68917
|
+
return {
|
|
68918
|
+
ok: false,
|
|
68919
|
+
audit: audit2,
|
|
68920
|
+
issues: [...gapIssues.values(), ...issues],
|
|
68921
|
+
applied: 0,
|
|
68922
|
+
stillManual: 0,
|
|
68923
|
+
rejected: 0,
|
|
68924
|
+
rejectedCriteria: [],
|
|
68925
|
+
notInWorklist,
|
|
68926
|
+
grounding
|
|
68927
|
+
};
|
|
68837
68928
|
}
|
|
68838
68929
|
const rejectedCriteria = adj.items.map((it) => it.criteriaId).filter((id) => itemIssues.has(id));
|
|
68839
68930
|
for (const id of itemIssues.keys()) if (!rejectedCriteria.includes(id)) rejectedCriteria.push(id);
|
|
68840
68931
|
const rejectedSet = notFolded;
|
|
68841
|
-
const rejectedWhy = (id) => expected[id] ?? residualRejectedReason(itemIssues.get(id)?.[0] ?? "refused by the gate");
|
|
68932
|
+
const rejectedWhy = (id) => expected[id] ?? (gapIssues.has(id) ? residualNotInWorklistReason() : residualRejectedReason(itemIssues.get(id)?.[0] ?? "refused by the gate"));
|
|
68933
|
+
const complete = issues.length === 0 && notInWorklist.length === 0;
|
|
68842
68934
|
const next = structuredClone(audit2);
|
|
68843
68935
|
const critById = new Map(next.criteria.map((c2) => [c2.id, c2]));
|
|
68844
68936
|
const newFindings = [];
|
|
@@ -68898,7 +68990,7 @@ function applyAdjudication(audit2, adj, opts = {}) {
|
|
|
68898
68990
|
next.packAdjudication = { standard: adj.standard, criteria: [...carried.values()] };
|
|
68899
68991
|
next.findings = [...next.findings, ...newFindings];
|
|
68900
68992
|
next.adjudicated = { date: adj.auditDate, applied, stillManual, ...rejectedCriteria.length ? { rejected: rejectedCriteria.length } : {} };
|
|
68901
|
-
return { ok:
|
|
68993
|
+
return { ok: complete, audit: next, issues, applied, stillManual, rejected: rejectedCriteria.length, rejectedCriteria, notInWorklist, grounding };
|
|
68902
68994
|
}
|
|
68903
68995
|
for (const it of adj.items) {
|
|
68904
68996
|
const c2 = critById.get(it.criteriaId);
|
|
@@ -68942,7 +69034,7 @@ function applyAdjudication(audit2, adj, opts = {}) {
|
|
|
68942
69034
|
next.residualRisks = next.residualRisks.filter((r) => byId2.get(r.criteriaId)?.verdict === "manual" || rejectedSet.has(r.criteriaId)).map((r) => rejectedSet.has(r.criteriaId) ? { ...r, reason: rejectedWhy(r.criteriaId) } : r);
|
|
68943
69035
|
recomputeTallies(next);
|
|
68944
69036
|
next.adjudicated = { date: adj.auditDate, applied, stillManual, ...rejectedCriteria.length ? { rejected: rejectedCriteria.length } : {} };
|
|
68945
|
-
return { ok:
|
|
69037
|
+
return { ok: complete, audit: next, issues, applied, stillManual, rejected: rejectedCriteria.length, rejectedCriteria, notInWorklist, grounding };
|
|
68946
69038
|
}
|
|
68947
69039
|
function agentSeverity(v, advisory) {
|
|
68948
69040
|
if (v === "bloquant" || v === "majeur" || v === "mineur") return v;
|
|
@@ -69008,9 +69100,20 @@ function recomputeTallies(a) {
|
|
|
69008
69100
|
}
|
|
69009
69101
|
var residualScanReason = () => "Rendering criterion \u2014 decide on the rendered DOM (`scan`).";
|
|
69010
69102
|
var residualUndecidableReason = () => "Left as an explicit residual risk (not decidable from the available evidence).";
|
|
69103
|
+
var residualNotInWorklistReason = () => "Not in the adjudication that was folded (coverage gap) \u2014 no verdict was offered, so none was refused. Adjudicate this criterion.";
|
|
69011
69104
|
var residualRejectedReason = (why) => `Adjudication refused by the gate \u2014 ${why.replace(/^criterion \S+: /, "")}. Re-adjudicate this criterion.`;
|
|
69012
69105
|
var SNIPPET_SHOWN = 200;
|
|
69013
|
-
var CAPTURE_FILES = [
|
|
69106
|
+
var CAPTURE_FILES = [
|
|
69107
|
+
"dom.html",
|
|
69108
|
+
"styles.json",
|
|
69109
|
+
"boxes.json",
|
|
69110
|
+
"css.json",
|
|
69111
|
+
"probes.json",
|
|
69112
|
+
"axe.json",
|
|
69113
|
+
"axtree.json",
|
|
69114
|
+
"screen.png",
|
|
69115
|
+
"screen-full.png"
|
|
69116
|
+
];
|
|
69014
69117
|
var CAPTURE_FILE_LABEL = {
|
|
69015
69118
|
fr: {
|
|
69016
69119
|
"dom.html": "le DOM s\xE9rialis\xE9 par le navigateur",
|
|
@@ -69020,7 +69123,8 @@ var CAPTURE_FILE_LABEL = {
|
|
|
69020
69123
|
"probes.json": "les mesures des sondes en direct",
|
|
69021
69124
|
"axe.json": "les r\xE9sultats axe-core de la page",
|
|
69022
69125
|
"axtree.json": "l'arbre d'accessibilit\xE9",
|
|
69023
|
-
"screen.png": "la capture d'\xE9cran"
|
|
69126
|
+
"screen.png": "la capture d'\xE9cran",
|
|
69127
|
+
"screen-full.png": "la page enti\xE8re en capture d'\xE9cran"
|
|
69024
69128
|
},
|
|
69025
69129
|
en: {
|
|
69026
69130
|
"dom.html": "the DOM the browser serialized",
|
|
@@ -69030,7 +69134,8 @@ var CAPTURE_FILE_LABEL = {
|
|
|
69030
69134
|
"probes.json": "the live probes' measurements",
|
|
69031
69135
|
"axe.json": "axe-core's results on the page",
|
|
69032
69136
|
"axtree.json": "the accessibility tree",
|
|
69033
|
-
"screen.png": "the screenshot"
|
|
69137
|
+
"screen.png": "the screenshot",
|
|
69138
|
+
"screen-full.png": "the whole page as a screenshot"
|
|
69034
69139
|
}
|
|
69035
69140
|
};
|
|
69036
69141
|
function captureFilesPresent(files, cwd) {
|
|
@@ -70802,10 +70907,19 @@ const isFile = target.startsWith("/work/");
|
|
|
70802
70907
|
const SNAPSHOT = process.env.ULTRA11Y_SNAPSHOT !== "0";
|
|
70803
70908
|
const COLLECT = ${JSON.stringify(COLLECT_SNAPSHOT)};
|
|
70804
70909
|
const REFLOW = ${JSON.stringify(REFLOW_PROBE)};
|
|
70910
|
+
const LOADING = ${JSON.stringify(LOADING_STATE)};
|
|
70805
70911
|
const browser = await chromium.launch({ args: ["--no-sandbox", "--disable-dev-shm-usage"] });
|
|
70806
70912
|
try {
|
|
70807
70913
|
const page = await browser.newPage();
|
|
70808
70914
|
await page.goto(isFile ? "file://" + target : target, { waitUntil: "load", timeout: 45000 });
|
|
70915
|
+
// Not while the page still declares itself loading (aria-busy, a spinner, \xAB Chargement\u2026 \xBB).
|
|
70916
|
+
// Bounded: a page that never settles is collected anyway, and the collector marks it.
|
|
70917
|
+
for (const end = Date.now() + ${LOADING_TIMEOUT_MS}; Date.now() < end; ) {
|
|
70918
|
+
let markers = [];
|
|
70919
|
+
try { markers = await page.evaluate(LOADING); } catch {}
|
|
70920
|
+
if (!markers.length) break;
|
|
70921
|
+
await page.waitForTimeout(150);
|
|
70922
|
+
}
|
|
70809
70923
|
// Collected FIRST, on the pristine page: axe's injected source and the 320px reflow
|
|
70810
70924
|
// resize both come after, and a snapshot must be the page as the browser built it.
|
|
70811
70925
|
let snapshot;
|
|
@@ -70813,6 +70927,12 @@ try {
|
|
|
70813
70927
|
try {
|
|
70814
70928
|
snapshot = await page.evaluate(COLLECT);
|
|
70815
70929
|
try { snapshot.screenshot = (await page.screenshot({ fullPage: false })).toString("base64"); } catch {}
|
|
70930
|
+
// The whole page beside it, height-bounded, for the report's reader.
|
|
70931
|
+
try {
|
|
70932
|
+
const vp = snapshot.viewport;
|
|
70933
|
+
const height = Math.min(snapshot.docHeight || 0, ${FULL_SCREENSHOT_MAX_HEIGHT});
|
|
70934
|
+
if (vp && height > vp.height) snapshot.screenshotFull = (await page.screenshot({ fullPage: true, clip: { x: 0, y: 0, width: vp.width, height } })).toString("base64");
|
|
70935
|
+
} catch {}
|
|
70816
70936
|
} catch {}
|
|
70817
70937
|
}
|
|
70818
70938
|
await page.addScriptTag({ content: axe.source });
|
|
@@ -70954,7 +71074,10 @@ function writeRunnerSnapshot(root, out2, target, page) {
|
|
|
70954
71074
|
// cites the first as the component behind the DOM. Forwarding auth and notes but not these
|
|
70955
71075
|
// left every source finding of a scanned sample « on no page » — the report could say which
|
|
70956
71076
|
// URL a defect was measured on, never which URL the code defect lives on.
|
|
70957
|
-
...page?.sources?.length ? { sources: page.sources } : {}
|
|
71077
|
+
...page?.sources?.length ? { sources: page.sources } : {},
|
|
71078
|
+
// Still loading when the browser collected it (#135): the report says so, and the audit
|
|
71079
|
+
// concludes nothing from this page's silence.
|
|
71080
|
+
...collected.loading?.length ? { loading: collected.loading } : {}
|
|
70958
71081
|
};
|
|
70959
71082
|
const v = validateSnapshotMeta(meta2);
|
|
70960
71083
|
if (!v.ok || !v.meta) return void 0;
|
|
@@ -70982,7 +71105,8 @@ function writeRunnerSnapshot(root, out2, target, page) {
|
|
|
70982
71105
|
// the criteria AXE_DECIDES is usable. A RunnerOutput always carries `violations` because
|
|
70983
71106
|
// a runner always runs axe — that is the one instrument neither runtime skips.
|
|
70984
71107
|
axe: { violations: out2.violations, ran: true },
|
|
70985
|
-
...collected.screenshot ? { screenshotBase64: collected.screenshot } : {}
|
|
71108
|
+
...collected.screenshot ? { screenshotBase64: collected.screenshot } : {},
|
|
71109
|
+
...collected.screenshotFull ? { screenshotFullBase64: collected.screenshotFull } : {}
|
|
70986
71110
|
});
|
|
70987
71111
|
} catch {
|
|
70988
71112
|
return void 0;
|
|
@@ -71773,10 +71897,12 @@ async function runOnPage(browser, AxeBuilder, target, isFile, opts) {
|
|
|
71773
71897
|
await page.waitForLoadState("networkidle", { timeout: 8e3 }).catch(() => {
|
|
71774
71898
|
});
|
|
71775
71899
|
await page.waitForTimeout(1200);
|
|
71900
|
+
await waitForLoaded(page, LOADING_TIMEOUT_MS);
|
|
71776
71901
|
const landedUrl = page.url() || url;
|
|
71777
71902
|
const httpStatus = typeof response?.status === "function" ? response.status() : void 0;
|
|
71778
71903
|
let snapshot;
|
|
71779
71904
|
let screenshot;
|
|
71905
|
+
let screenshotFull;
|
|
71780
71906
|
if (opts.snapshot !== false) {
|
|
71781
71907
|
try {
|
|
71782
71908
|
snapshot = await page.evaluate(COLLECT_SNAPSHOT);
|
|
@@ -71787,6 +71913,14 @@ async function runOnPage(browser, AxeBuilder, target, isFile, opts) {
|
|
|
71787
71913
|
screenshot = (await page.screenshot({ fullPage: false })).toString("base64");
|
|
71788
71914
|
} catch {
|
|
71789
71915
|
}
|
|
71916
|
+
const vp = snapshot.viewport;
|
|
71917
|
+
const height = Math.min(snapshot.docHeight ?? 0, FULL_SCREENSHOT_MAX_HEIGHT);
|
|
71918
|
+
if (vp && height > vp.height) {
|
|
71919
|
+
try {
|
|
71920
|
+
screenshotFull = (await page.screenshot({ fullPage: true, clip: { x: 0, y: 0, width: vp.width, height } })).toString("base64");
|
|
71921
|
+
} catch {
|
|
71922
|
+
}
|
|
71923
|
+
}
|
|
71790
71924
|
}
|
|
71791
71925
|
}
|
|
71792
71926
|
const axeRes = await new AxeBuilder({ page }).withTags(AXE_TAGS).analyze();
|
|
@@ -71912,7 +72046,7 @@ async function runOnPage(browser, AxeBuilder, target, isFile, opts) {
|
|
|
71912
72046
|
// Sorted for the same reason as `probed`: a persisted artefact that differs only by list
|
|
71913
72047
|
// order shows up as a change in every diff of a committed `.ultra11y/pages` tree.
|
|
71914
72048
|
...skipped.length ? { skipped: [...skipped].sort((a, b) => a.sc.localeCompare(b.sc)) } : {},
|
|
71915
|
-
...snapshot ? { snapshot: { ...snapshot, ...screenshot ? { screenshot } : {} } } : {}
|
|
72049
|
+
...snapshot ? { snapshot: { ...snapshot, ...screenshot ? { screenshot } : {}, ...screenshotFull ? { screenshotFull } : {} } } : {}
|
|
71916
72050
|
};
|
|
71917
72051
|
} finally {
|
|
71918
72052
|
await context.close();
|
|
@@ -75075,7 +75209,7 @@ function scoreboardBlocks(result, standard, lang, sheetHref) {
|
|
|
75075
75209
|
];
|
|
75076
75210
|
const orphans = unattributedFindings(result).filter((f) => !f.advisory).length;
|
|
75077
75211
|
if (orphans) out2.push({ kind: "note", tone: "warn", runs: ticks(unattributedNote(orphans, lang)) });
|
|
75078
|
-
for (const basis of ["attributed", "not-audited"]) {
|
|
75212
|
+
for (const basis of ["attributed", "not-audited", "loading"]) {
|
|
75079
75213
|
const note = derived.some((p) => p.basis === basis) ? pageBasisWarning(basis, lang) : void 0;
|
|
75080
75214
|
if (note) out2.push({ kind: "note", tone: "warn", runs: ticks(note) });
|
|
75081
75215
|
}
|
|
@@ -75657,7 +75791,8 @@ function auditCollected(root, payload) {
|
|
|
75657
75791
|
...payload.boxes ? { boxes: payload.boxes } : {},
|
|
75658
75792
|
...payload.axtree ? { axtree: payload.axtree } : {},
|
|
75659
75793
|
...payload.css ? { css: payload.css } : {},
|
|
75660
|
-
...shot ? { screenshotBase64: shot } : {}
|
|
75794
|
+
...shot ? { screenshotBase64: shot } : {},
|
|
75795
|
+
...typeof payload.screenshotFull === "string" && payload.screenshotFull.trim() ? { screenshotFullBase64: payload.screenshotFull } : {}
|
|
75661
75796
|
});
|
|
75662
75797
|
return { ok: true, result: runAudit({ inputs: [join51(dir, "dom.html")] }) };
|
|
75663
75798
|
}
|
|
@@ -75950,6 +76085,8 @@ export async function checkA11y(page, opts = {}) {
|
|
|
75950
76085
|
...(opts.auth !== undefined ? { auth: opts.auth } : {}),
|
|
75951
76086
|
...(opts.sources ? { sources: opts.sources } : {}),
|
|
75952
76087
|
...(opts.notes ? { notes: opts.notes } : {}),
|
|
76088
|
+
// Still loading when collected: marked, so the audit concludes nothing from its silence.
|
|
76089
|
+
...(collected.loading && collected.loading.length ? { loading: collected.loading } : {}),
|
|
75953
76090
|
},
|
|
75954
76091
|
dom: collected.dom,
|
|
75955
76092
|
styles: collected.styles,
|
|
@@ -77799,6 +77936,7 @@ function handleFold(args2, cwd) {
|
|
|
77799
77936
|
stillManual: r.stillManual,
|
|
77800
77937
|
rejected: r.rejected,
|
|
77801
77938
|
rejectedCriteria: r.rejectedCriteria,
|
|
77939
|
+
notInWorklist: r.notInWorklist,
|
|
77802
77940
|
issues: r.issues,
|
|
77803
77941
|
conformancePct: r.audit.conformancePct,
|
|
77804
77942
|
grounding: r.grounding
|
|
@@ -78335,7 +78473,7 @@ var WRITE_TOOLS = [
|
|
|
78335
78473
|
{
|
|
78336
78474
|
name: "ultra11y_fold",
|
|
78337
78475
|
title: "Fold an adjudication into the audit",
|
|
78338
|
-
description: "WRITES TO THE PROJECT (with write:true): land the verdicts you wrote on the ultra11y_adjudicate worklist \u2014 the counterpart of `verify --apply`. Send the decisions only (criteriaId, verdict, justification, citations, findings, reason): the server re-derives the evidence and applies the SAME gate \u2014 a C must cite the evidence it cleared, an NC must carry groundable findings. Partial by default: a refused verdict stays \xAB to assess \xBB and is listed in rejectedCriteria with its reason; strict:true lands nothing if anything is refused. Dry-run by default (the gate's verdict, nothing written); write:true writes <out>/audit-latest.json, and ledger:true records the ACCEPTED verdicts in the verdict ledger.",
|
|
78476
|
+
description: "WRITES TO THE PROJECT (with write:true): land the verdicts you wrote on the ultra11y_adjudicate worklist \u2014 the counterpart of `verify --apply`. Send the decisions only (criteriaId, verdict, justification, citations, findings, reason): the server re-derives the evidence and applies the SAME gate \u2014 a C must cite the evidence it cleared, an NC must carry groundable findings. Partial by default: a refused verdict stays \xAB to assess \xBB and is listed in rejectedCriteria with its reason; an open criterion the file never mentions is not a refusal and is listed apart in notInWorklist; strict:true lands nothing if anything is refused. Dry-run by default (the gate's verdict, nothing written); write:true writes <out>/audit-latest.json, and ledger:true records the ACCEPTED verdicts in the verdict ledger.",
|
|
78339
78477
|
inputSchema: {
|
|
78340
78478
|
type: "object",
|
|
78341
78479
|
properties: {
|
|
@@ -80541,7 +80679,7 @@ async function cmdPages(p) {
|
|
|
80541
80679
|
const derived = derivePages(result, scope);
|
|
80542
80680
|
const split = p.flags.split === "page";
|
|
80543
80681
|
const outDir = typeof p.flags.out === "string" && p.flags.out ? p.flags.out : void 0;
|
|
80544
|
-
const shotOf = (id) => join56(PAGES_DIR, id, "screen.png");
|
|
80682
|
+
const shotOf = (id) => pageScreenshot(PAGES_DIR, id) ?? join56(PAGES_DIR, id, "screen.png");
|
|
80545
80683
|
const shotsRelative = (fileDir) => {
|
|
80546
80684
|
const m = /* @__PURE__ */ new Map();
|
|
80547
80685
|
for (const pg of derived) {
|
|
@@ -80719,7 +80857,9 @@ async function cmdSnapshot(p) {
|
|
|
80719
80857
|
// The screenshot rides in as base64 (a producer has bytes, not a path) and powers the
|
|
80720
80858
|
// pixel tier. writeSnapshot owns the decoding, so every producer — this command, the
|
|
80721
80859
|
// dev side-car, `scan` — writes it the one same way.
|
|
80722
|
-
...typeof payload.screenshot === "string" && payload.screenshot ? { screenshotBase64: payload.screenshot } : {}
|
|
80860
|
+
...typeof payload.screenshot === "string" && payload.screenshot ? { screenshotBase64: payload.screenshot } : {},
|
|
80861
|
+
// The whole page, for the report's reader — never read by a rule.
|
|
80862
|
+
...typeof payload.screenshotFull === "string" && payload.screenshotFull ? { screenshotFullBase64: payload.screenshotFull } : {}
|
|
80723
80863
|
});
|
|
80724
80864
|
} catch (e) {
|
|
80725
80865
|
console.error(`ultra11y snapshot write: could not write the snapshot: ${e instanceof Error ? e.message : String(e)}`);
|
|
@@ -81964,6 +82104,7 @@ function replayLedgerFile(p, ledger, lang) {
|
|
|
81964
82104
|
stillManual: r.stillManual,
|
|
81965
82105
|
rejected: r.rejected,
|
|
81966
82106
|
rejectedCriteria: r.rejectedCriteria,
|
|
82107
|
+
notInWorklist: r.notInWorklist,
|
|
81967
82108
|
replayed: rp.fresh.length,
|
|
81968
82109
|
stale: rp.stale,
|
|
81969
82110
|
obsolete: rp.obsolete,
|
|
@@ -81995,6 +82136,13 @@ function replayLedgerFile(p, ledger, lang) {
|
|
|
81995
82136
|
}
|
|
81996
82137
|
return 0;
|
|
81997
82138
|
}
|
|
82139
|
+
function reportNotInWorklist(ids2, lang) {
|
|
82140
|
+
if (!ids2.length) return;
|
|
82141
|
+
const shown = ids2.slice(0, 40).join(", ") + (ids2.length > 40 ? ` \u2026 +${ids2.length - 40}` : "");
|
|
82142
|
+
console.error(
|
|
82143
|
+
lang === "fr" ? `\u2139 ${ids2.length} crit\xE8re(s) hors de la liste \u2014 absent(s) de ce fichier, rien n'a \xE9t\xE9 refus\xE9 ; ils restent \xE0 \xE9valuer : ${shown}` : `\u2139 ${ids2.length} criterion(ia) not in this worklist \u2014 absent from this file, nothing was refused; they stay to assess: ${shown}`
|
|
82144
|
+
);
|
|
82145
|
+
}
|
|
81998
82146
|
function applyAdjudicationFile(p, adj, lang) {
|
|
81999
82147
|
const inFlag = p.flags.in;
|
|
82000
82148
|
if (typeof inFlag !== "string" || !inFlag) {
|
|
@@ -82019,6 +82167,7 @@ function applyAdjudicationFile(p, adj, lang) {
|
|
|
82019
82167
|
else {
|
|
82020
82168
|
console.error(lang === "fr" ? `\u2717 Adjudication rejet\xE9e (${r.issues.length} probl\xE8me(s)) :` : `\u2717 Adjudication rejected (${r.issues.length} issue(s)):`);
|
|
82021
82169
|
for (const i2 of r.issues) console.error(` \u2717 ${i2}`);
|
|
82170
|
+
reportNotInWorklist(r.notInWorklist, lang);
|
|
82022
82171
|
}
|
|
82023
82172
|
return 1;
|
|
82024
82173
|
}
|
|
@@ -82028,6 +82177,7 @@ function applyAdjudicationFile(p, adj, lang) {
|
|
|
82028
82177
|
);
|
|
82029
82178
|
for (const i2 of r.issues) console.error(` \u2717 ${i2}`);
|
|
82030
82179
|
}
|
|
82180
|
+
if (!p.flags.json) reportNotInWorklist(r.notInWorklist, lang);
|
|
82031
82181
|
const out2 = typeof p.flags.out === "string" ? p.flags.out : ".";
|
|
82032
82182
|
mkdirSync20(out2, { recursive: true });
|
|
82033
82183
|
const auditPath = join56(out2, "audit-latest.json");
|
|
@@ -82058,6 +82208,7 @@ function applyAdjudicationFile(p, adj, lang) {
|
|
|
82058
82208
|
stillManual: r.stillManual,
|
|
82059
82209
|
rejected: r.rejected,
|
|
82060
82210
|
rejectedCriteria: r.rejectedCriteria,
|
|
82211
|
+
notInWorklist: r.notInWorklist,
|
|
82061
82212
|
issues: r.issues,
|
|
82062
82213
|
conformancePct: r.audit.conformancePct,
|
|
82063
82214
|
findings: r.audit.findings.length,
|
|
@@ -82069,7 +82220,7 @@ function applyAdjudicationFile(p, adj, lang) {
|
|
|
82069
82220
|
);
|
|
82070
82221
|
else
|
|
82071
82222
|
console.log(
|
|
82072
|
-
lang === "fr" ? `\u2713 ${r.applied} crit\xE8re(s) adjug\xE9(s), ${r.stillManual} laiss\xE9(s) en r\xE9siduel${r.rejected ? `, ${r.rejected} refus\xE9(s)` : ""} \u2192 ${auditPath}` : `\u2713 ${r.applied} criterion(ia) adjudicated, ${r.stillManual} left residual${r.rejected ? `, ${r.rejected} refused` : ""} \u2192 ${auditPath}`
|
|
82223
|
+
lang === "fr" ? `\u2713 ${r.applied} crit\xE8re(s) adjug\xE9(s), ${r.stillManual} laiss\xE9(s) en r\xE9siduel${r.rejected ? `, ${r.rejected} refus\xE9(s)` : ""}${r.notInWorklist.length ? `, ${r.notInWorklist.length} hors de la liste` : ""} \u2192 ${auditPath}` : `\u2713 ${r.applied} criterion(ia) adjudicated, ${r.stillManual} left residual${r.rejected ? `, ${r.rejected} refused` : ""}${r.notInWorklist.length ? `, ${r.notInWorklist.length} not in this worklist` : ""} \u2192 ${auditPath}`
|
|
82073
82224
|
);
|
|
82074
82225
|
return 0;
|
|
82075
82226
|
}
|
|
@@ -82343,6 +82494,7 @@ async function cmdJudge(p) {
|
|
|
82343
82494
|
console.error(lang === "fr" ? `\u2717 Adjudication rejet\xE9e (${r.issues.length} probl\xE8me(s)) :` : `\u2717 Adjudication rejected (${r.issues.length} issue(s)):`);
|
|
82344
82495
|
for (const i2 of r.issues.slice(0, 40)) console.error(` \u2717 ${i2}`);
|
|
82345
82496
|
if (r.issues.length > 40) console.error(` \u2026 +${r.issues.length - 40}`);
|
|
82497
|
+
reportNotInWorklist(r.notInWorklist, lang);
|
|
82346
82498
|
return 1;
|
|
82347
82499
|
}
|
|
82348
82500
|
if (r.rejected > 0) {
|
|
@@ -82352,6 +82504,7 @@ async function cmdJudge(p) {
|
|
|
82352
82504
|
for (const i2 of r.issues.slice(0, 40)) console.error(` \u2717 ${i2}`);
|
|
82353
82505
|
if (r.issues.length > 40) console.error(` \u2026 +${r.issues.length - 40}`);
|
|
82354
82506
|
}
|
|
82507
|
+
reportNotInWorklist(r.notInWorklist, lang);
|
|
82355
82508
|
mkdirSync20(out2, { recursive: true });
|
|
82356
82509
|
const auditPath = join56(out2, "audit-latest.json");
|
|
82357
82510
|
writeFileSync23(auditPath, `${JSON.stringify(auditDocumentFor(r.audit, adj.standard, lang), null, 2)}
|
|
@@ -82372,7 +82525,7 @@ async function cmdJudge(p) {
|
|
|
82372
82525
|
);
|
|
82373
82526
|
}
|
|
82374
82527
|
console.log(
|
|
82375
|
-
lang === "fr" ? `\u2713 ${r.applied} crit\xE8re(s) adjug\xE9(s), ${r.stillManual} laiss\xE9(s) en r\xE9siduel${r.rejected ? `, ${r.rejected} refus\xE9(s)` : ""} \u2192 ${auditPath}` : `\u2713 ${r.applied} criterion(ia) adjudicated, ${r.stillManual} left residual${r.rejected ? `, ${r.rejected} refused` : ""} \u2192 ${auditPath}`
|
|
82528
|
+
lang === "fr" ? `\u2713 ${r.applied} crit\xE8re(s) adjug\xE9(s), ${r.stillManual} laiss\xE9(s) en r\xE9siduel${r.rejected ? `, ${r.rejected} refus\xE9(s)` : ""}${r.notInWorklist.length ? `, ${r.notInWorklist.length} hors de la liste` : ""} \u2192 ${auditPath}` : `\u2713 ${r.applied} criterion(ia) adjudicated, ${r.stillManual} left residual${r.rejected ? `, ${r.rejected} refused` : ""}${r.notInWorklist.length ? `, ${r.notInWorklist.length} not in this worklist` : ""} \u2192 ${auditPath}`
|
|
82376
82529
|
);
|
|
82377
82530
|
return 0;
|
|
82378
82531
|
}
|
|
@@ -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.57.
|
|
6
|
+
version: 5.57.4
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# review-a11y — accessibility review of changed code
|