ultra11y 5.53.0 → 5.54.0
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 +4 -2
- package/package.json +1 -1
- package/scripts/ultra11y.mjs +161 -47
- package/skills/review-a11y/SKILL.md +1 -1
- package/skills/review-a11y/scripts/ultra11y.mjs +161 -47
- package/skills/ultra11y/SKILL.md +1 -1
- package/skills/ultra11y/references/mcp.md +13 -0
- package/skills/ultra11y/scripts/ultra11y.mjs +161 -47
- package/skills/ultra11y/templates/gitlab-ci.yml +1 -1
- package/src/mcp/handlers.ts +105 -3
- package/src/mcp/tools.ts +37 -1
- 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.
|
|
13
|
+
"version": "5.54.0",
|
|
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.
|
|
4
|
+
"version": "5.54.0",
|
|
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.
|
|
4
|
+
"version": "5.54.0",
|
|
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",
|
|
@@ -27,7 +27,7 @@ import { fileURLToPath } from "node:url";
|
|
|
27
27
|
// Ownership marker: `ultra11y install --opencode` refuses to overwrite a plugin file that
|
|
28
28
|
// does not carry it, so a user's own ultra11y.js is never clobbered.
|
|
29
29
|
const ULTRA11Y_OPENCODE_PLUGIN = "ULTRA11Y_OPENCODE_PLUGIN";
|
|
30
|
-
const ULTRA11Y_PLUGIN_VERSION = "5.
|
|
30
|
+
const ULTRA11Y_PLUGIN_VERSION = "5.54.0";
|
|
31
31
|
|
|
32
32
|
const here = dirname(fileURLToPath(import.meta.url));
|
|
33
33
|
|
package/README.md
CHANGED
|
@@ -238,8 +238,10 @@ pinned when the tool list was built would reject a pack that is perfectly valid
|
|
|
238
238
|
project being asked about. The handler validates against the registry and names what it knows.
|
|
239
239
|
|
|
240
240
|
`--allow-write` additionally exposes `ultra11y_fix` (safe codemods, dry-run by
|
|
241
|
-
default)
|
|
242
|
-
|
|
241
|
+
default), `ultra11y_fold` (lands the verdicts you wrote on the `ultra11y_adjudicate`
|
|
242
|
+
worklist — `verify --apply` over MCP: same gate, partial by default with every refusal
|
|
243
|
+
listed, dry-run unless `write: true`, `ledger: true` to record the accepted verdicts) and
|
|
244
|
+
`ultra11y_init` (hook/CI/baseline) — the tools that change **your** project. `ultra11y_scan` is declared but declines over MCP: it drives a headless
|
|
243
245
|
browser and may pull a Docker image, which is not a subprocess lifecycle a
|
|
244
246
|
long-lived server should own. It tells you to run it from the CLI and re-audit.
|
|
245
247
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ultra11y",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.54.0",
|
|
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
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
// src/cli.ts
|
|
4
|
-
import { realpathSync as realpathSync8, writeFileSync as
|
|
4
|
+
import { realpathSync as realpathSync8, writeFileSync as writeFileSync22, mkdirSync as mkdirSync19, existsSync as existsSync40, readFileSync as readFileSync36, appendFileSync, copyFileSync as copyFileSync4 } from "fs";
|
|
5
5
|
import { join as join53, relative as relative6, resolve as resolve18, sep as sep7, dirname as dirname20 } from "path";
|
|
6
6
|
import { fileURLToPath as fileURLToPath5, pathToFileURL as pathToFileURL3 } from "url";
|
|
7
7
|
|
|
8
8
|
// src/types.ts
|
|
9
|
-
var VERSION = "5.
|
|
9
|
+
var VERSION = "5.54.0";
|
|
10
10
|
var SCHEMA_VERSION = 2;
|
|
11
11
|
function isAdjudicated(by) {
|
|
12
12
|
return by === "agent" || by === "human";
|
|
@@ -74063,7 +74063,7 @@ ${xs.map(line).join("\n")}` : t3.none;
|
|
|
74063
74063
|
import { createInterface as createInterface2 } from "readline";
|
|
74064
74064
|
|
|
74065
74065
|
// src/mcp/handlers.ts
|
|
74066
|
-
import { existsSync as existsSync38, readFileSync as readFileSync34, realpathSync as realpathSync6, statSync as statSync18 } from "fs";
|
|
74066
|
+
import { existsSync as existsSync38, mkdirSync as mkdirSync18, readFileSync as readFileSync34, realpathSync as realpathSync6, statSync as statSync18, writeFileSync as writeFileSync21 } from "fs";
|
|
74067
74067
|
import { isAbsolute as isAbsolute5, join as join51, resolve as resolve16, sep as sep5 } from "path";
|
|
74068
74068
|
|
|
74069
74069
|
// src/criteria-view.ts
|
|
@@ -74522,7 +74522,7 @@ var ToolError = class extends Error {
|
|
|
74522
74522
|
var MAX_READ_LINES = 2e3;
|
|
74523
74523
|
var MAX_READ_BYTES = 8 * 1024 * 1024;
|
|
74524
74524
|
var DEFAULT_GLOBS = ["**/*.html", "**/*.htm", "**/*.jsx", "**/*.tsx", "**/*.vue", "**/*.svelte"];
|
|
74525
|
-
var WRITE_TOOL_NAMES = /* @__PURE__ */ new Set(["ultra11y_fix", "ultra11y_scan", "ultra11y_init"]);
|
|
74525
|
+
var WRITE_TOOL_NAMES = /* @__PURE__ */ new Set(["ultra11y_fix", "ultra11y_fold", "ultra11y_scan", "ultra11y_init"]);
|
|
74526
74526
|
var REFERENCE_TOOL_NAMES = /* @__PURE__ */ new Set(["ultra11y_criteria", "ultra11y_standards", "ultra11y_glossary", "ultra11y_guidance", "ultra11y_method"]);
|
|
74527
74527
|
function str2(v) {
|
|
74528
74528
|
return typeof v === "string" && v.trim() !== "" ? v : void 0;
|
|
@@ -74641,6 +74641,8 @@ async function dispatch(name2, args2, cwd) {
|
|
|
74641
74641
|
return handleRead(args2, cwd);
|
|
74642
74642
|
case "ultra11y_fix":
|
|
74643
74643
|
return handleFix(args2, cwd);
|
|
74644
|
+
case "ultra11y_fold":
|
|
74645
|
+
return handleFold(args2, cwd);
|
|
74644
74646
|
case "ultra11y_init":
|
|
74645
74647
|
return handleInit(args2, cwd);
|
|
74646
74648
|
case "ultra11y_scan":
|
|
@@ -74869,6 +74871,88 @@ function handleFix(args2, cwd) {
|
|
|
74869
74871
|
process.chdir(prev);
|
|
74870
74872
|
}
|
|
74871
74873
|
}
|
|
74874
|
+
function handleFold(args2, cwd) {
|
|
74875
|
+
const adj = adjudicationArg(args2);
|
|
74876
|
+
standardOf({ standard: adj.standard });
|
|
74877
|
+
const asked = str2(args2.standard);
|
|
74878
|
+
if (asked !== void 0 && standardOf(args2) !== adj.standard) {
|
|
74879
|
+
throw new ToolError(`\`standard\` is "${asked}" but the adjudication is for "${adj.standard}" \u2014 fold it under its own standard.`);
|
|
74880
|
+
}
|
|
74881
|
+
const lang = langOf(args2);
|
|
74882
|
+
const auditFile = str2(args2.audit_file);
|
|
74883
|
+
let base;
|
|
74884
|
+
if (auditFile) {
|
|
74885
|
+
const path = resolve16(cwd, auditFile);
|
|
74886
|
+
try {
|
|
74887
|
+
base = unwrapAudit(JSON.parse(readFileSync34(path, "utf8")));
|
|
74888
|
+
} catch {
|
|
74889
|
+
throw new ToolError(`\`audit_file\` not found or not valid JSON: ${path}`);
|
|
74890
|
+
}
|
|
74891
|
+
} else base = audit(args2, cwd);
|
|
74892
|
+
hydrateAdjudication(adj, base, { cwd });
|
|
74893
|
+
const strict = bool(args2.strict);
|
|
74894
|
+
const r = applyAdjudication(base, adj, { cwd, strict });
|
|
74895
|
+
const summary = {
|
|
74896
|
+
cwd,
|
|
74897
|
+
standard: adj.standard,
|
|
74898
|
+
ok: r.ok,
|
|
74899
|
+
applied: r.applied,
|
|
74900
|
+
stillManual: r.stillManual,
|
|
74901
|
+
rejected: r.rejected,
|
|
74902
|
+
rejectedCriteria: r.rejectedCriteria,
|
|
74903
|
+
issues: r.issues,
|
|
74904
|
+
conformancePct: r.audit.conformancePct,
|
|
74905
|
+
grounding: r.grounding
|
|
74906
|
+
};
|
|
74907
|
+
const landed = !(!r.ok && (strict || r.applied + r.stillManual === 0));
|
|
74908
|
+
if (!bool(args2.write) || !landed) {
|
|
74909
|
+
return {
|
|
74910
|
+
...summary,
|
|
74911
|
+
written: false,
|
|
74912
|
+
next: landed ? "Dry run: nothing was written. Re-call with write:true (and ledger:true to record the accepted verdicts) to land them." : "Nothing landed. Fix the refused verdicts listed in issues \u2014 cite the evidence a C cleared, ground every NC finding \u2014 and fold again."
|
|
74913
|
+
};
|
|
74914
|
+
}
|
|
74915
|
+
const outDir = resolve16(cwd, str2(args2.out) ?? ".");
|
|
74916
|
+
mkdirSync18(outDir, { recursive: true });
|
|
74917
|
+
const auditPath = join51(outDir, "audit-latest.json");
|
|
74918
|
+
writeFileSync21(auditPath, `${JSON.stringify(auditDocumentFor(r.audit, adj.standard, lang), null, 2)}
|
|
74919
|
+
`);
|
|
74920
|
+
let ledger;
|
|
74921
|
+
if (bool(args2.ledger)) {
|
|
74922
|
+
const path = ledgerPath(adj.standard, cwd);
|
|
74923
|
+
const refused = new Set(r.rejectedCriteria);
|
|
74924
|
+
const accepted = new Set(adj.items.map((it) => it.criteriaId).filter((id) => !refused.has(id)));
|
|
74925
|
+
const fresh = entriesFrom(adj, accepted, r.audit.date, cwd);
|
|
74926
|
+
writeLedger(path, mergeLedger(readLedger(path), adj.standard, fresh));
|
|
74927
|
+
const blind = unreadableCaptures(r.audit, cwd);
|
|
74928
|
+
ledger = {
|
|
74929
|
+
path,
|
|
74930
|
+
recorded: fresh.length,
|
|
74931
|
+
...blind.length ? { warning: `written without the snapshots of ${blind.length} page(s) this audit says it read \u2014 these verdicts will be dropped as stale on replay` } : {}
|
|
74932
|
+
};
|
|
74933
|
+
}
|
|
74934
|
+
return { ...summary, written: true, auditPath, ...ledger ? { ledger } : {} };
|
|
74935
|
+
}
|
|
74936
|
+
function adjudicationArg(args2) {
|
|
74937
|
+
const inline = args2.adjudication;
|
|
74938
|
+
const file = str2(args2.adjudication_file);
|
|
74939
|
+
if (inline !== void 0 && file) throw new ToolError("pass `adjudication` or `adjudication_file`, not both.");
|
|
74940
|
+
let v = inline;
|
|
74941
|
+
if (file) {
|
|
74942
|
+
if (!isAbsolute5(file)) throw new ToolError("`adjudication_file` must be an absolute path.");
|
|
74943
|
+
try {
|
|
74944
|
+
v = JSON.parse(readFileSync34(file, "utf8"));
|
|
74945
|
+
} catch {
|
|
74946
|
+
throw new ToolError(`\`adjudication_file\` not found or not valid JSON: ${file}`);
|
|
74947
|
+
}
|
|
74948
|
+
}
|
|
74949
|
+
if (v === void 0) throw new ToolError("`adjudication` is required \u2014 the filled ultra11y_adjudicate worklist (or `adjudication_file`).");
|
|
74950
|
+
const a = v;
|
|
74951
|
+
if (!a || typeof a !== "object" || a.kind !== "adjudication" || !Array.isArray(a.items) || typeof a.standard !== "string") {
|
|
74952
|
+
throw new ToolError("not an adjudication: expected { kind: 'adjudication', standard, items: [...] }.");
|
|
74953
|
+
}
|
|
74954
|
+
return a;
|
|
74955
|
+
}
|
|
74872
74956
|
var FAIL_ON_ALIASES = { error: "blocking", warning: "major", notice: "minor" };
|
|
74873
74957
|
var FAIL_ON_TOKENS = "blocking, major, minor (or bloquant, majeur, mineur; error/warning/notice as aliases)";
|
|
74874
74958
|
function handleInit(args2, cwd) {
|
|
@@ -75321,6 +75405,34 @@ var TOOLS2 = [
|
|
|
75321
75405
|
}
|
|
75322
75406
|
];
|
|
75323
75407
|
var WRITE_TOOLS = [
|
|
75408
|
+
{
|
|
75409
|
+
name: "ultra11y_fold",
|
|
75410
|
+
title: "Fold an adjudication into the audit",
|
|
75411
|
+
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.",
|
|
75412
|
+
inputSchema: {
|
|
75413
|
+
type: "object",
|
|
75414
|
+
properties: {
|
|
75415
|
+
cwd: cwdProp,
|
|
75416
|
+
adjudication: {
|
|
75417
|
+
type: "object",
|
|
75418
|
+
description: "The filled adjudication: { kind: 'adjudication', standard, items: [...] }, as ultra11y_adjudicate's worklist with your verdicts."
|
|
75419
|
+
},
|
|
75420
|
+
adjudication_file: { type: "string", description: "Absolute path to an adjudication JSON file to fold instead." },
|
|
75421
|
+
audit_file: {
|
|
75422
|
+
type: "string",
|
|
75423
|
+
description: "Absolute path (or relative to cwd) to the audit JSON to fold into, like `--in`. Default: audit the project now, as ultra11y_adjudicate did."
|
|
75424
|
+
},
|
|
75425
|
+
globs: globsProp,
|
|
75426
|
+
standard: { type: "string", description: "Must match the adjudication's own standard when given." },
|
|
75427
|
+
strict: { type: "boolean", description: "All-or-nothing: a single refused verdict discards the whole fold." },
|
|
75428
|
+
write: { type: "boolean", description: "Actually write the folded audit (default: dry-run, returns the gate's verdict)." },
|
|
75429
|
+
out: { type: "string", description: "Directory, relative to cwd, for audit-latest.json. Default: the project root, as `verify --apply`." },
|
|
75430
|
+
ledger: { type: "boolean", description: "With write:true, also record the accepted verdicts in .ultra11y/verdicts/<standard>.json." },
|
|
75431
|
+
lang: langProp
|
|
75432
|
+
},
|
|
75433
|
+
required: ["cwd"]
|
|
75434
|
+
}
|
|
75435
|
+
},
|
|
75324
75436
|
{
|
|
75325
75437
|
name: "ultra11y_fix",
|
|
75326
75438
|
title: "Apply safe accessibility codemods",
|
|
@@ -75472,6 +75584,8 @@ var TOOL_META2 = {
|
|
|
75472
75584
|
// Rewrites source files. Not destructive in the delete sense, and it verifies
|
|
75473
75585
|
// its own work — but it is the user's code.
|
|
75474
75586
|
ultra11y_fix: { write: true, destructive: false, idempotent: true, openWorld: false },
|
|
75587
|
+
// Writes the folded audit and, on request, merges the accepted verdicts into the ledger.
|
|
75588
|
+
ultra11y_fold: { write: true, destructive: false, idempotent: true, openWorld: false },
|
|
75475
75589
|
// Fetches a URL and may pull a Docker image.
|
|
75476
75590
|
ultra11y_scan: { write: true, destructive: false, idempotent: false, openWorld: true },
|
|
75477
75591
|
ultra11y_init: { write: true, destructive: false, idempotent: true, openWorld: false }
|
|
@@ -77170,8 +77284,8 @@ async function cmdAudit(p) {
|
|
|
77170
77284
|
const asFile = out2.toLowerCase().endsWith(".json");
|
|
77171
77285
|
const target = asFile ? out2 : join53(out2, "audit-latest.json");
|
|
77172
77286
|
try {
|
|
77173
|
-
|
|
77174
|
-
|
|
77287
|
+
mkdirSync19(asFile ? dirname20(out2) : out2, { recursive: true });
|
|
77288
|
+
writeFileSync22(target, JSON.stringify(document, null, 2) + "\n");
|
|
77175
77289
|
console.error(lang === "fr" ? `\u2192 audit \xE9crit dans ${target}` : `\u2192 audit written to ${target}`);
|
|
77176
77290
|
} catch {
|
|
77177
77291
|
}
|
|
@@ -77247,8 +77361,8 @@ async function cmdDev(p) {
|
|
|
77247
77361
|
const dir = join53(root, ".ultra11y", "next");
|
|
77248
77362
|
const rel2 = ".ultra11y/next/overlay.jsx";
|
|
77249
77363
|
try {
|
|
77250
|
-
|
|
77251
|
-
|
|
77364
|
+
mkdirSync19(dir, { recursive: true });
|
|
77365
|
+
writeFileSync22(join53(dir, "overlay.jsx"), nextOverlayComponent(port));
|
|
77252
77366
|
} catch (e) {
|
|
77253
77367
|
console.error(`ultra11y dev: could not write ${rel2}: ${e instanceof Error ? e.message : String(e)}`);
|
|
77254
77368
|
return 1;
|
|
@@ -77389,7 +77503,7 @@ ${found} page(s) discovered, ${merged.added.length} new. Nothing was written \u2
|
|
|
77389
77503
|
}
|
|
77390
77504
|
}
|
|
77391
77505
|
doc.sample = v.sample;
|
|
77392
|
-
|
|
77506
|
+
writeFileSync22(file, `${JSON.stringify(doc, null, 2)}
|
|
77393
77507
|
`);
|
|
77394
77508
|
if (!p.flags.json)
|
|
77395
77509
|
console.log(
|
|
@@ -77444,8 +77558,8 @@ async function cmdPages(p) {
|
|
|
77444
77558
|
console.log(json);
|
|
77445
77559
|
const outDir2 = typeof p.flags.out === "string" && p.flags.out ? p.flags.out : "";
|
|
77446
77560
|
if (outDir2) {
|
|
77447
|
-
|
|
77448
|
-
|
|
77561
|
+
mkdirSync19(outDir2, { recursive: true });
|
|
77562
|
+
writeFileSync22(join53(outDir2, "pages.json"), `${json}
|
|
77449
77563
|
`);
|
|
77450
77564
|
}
|
|
77451
77565
|
return 0;
|
|
@@ -77490,7 +77604,7 @@ async function cmdPages(p) {
|
|
|
77490
77604
|
for (const pg of derived) {
|
|
77491
77605
|
const src = shotOf(pg.id);
|
|
77492
77606
|
if (!existsSync40(src)) continue;
|
|
77493
|
-
|
|
77607
|
+
mkdirSync19(assets, { recursive: true });
|
|
77494
77608
|
copyFileSync4(src, join53(assets, `${pg.id}.png`));
|
|
77495
77609
|
m.set(pg.id, `./assets/${pg.id}.png`);
|
|
77496
77610
|
}
|
|
@@ -77508,7 +77622,7 @@ async function cmdPages(p) {
|
|
|
77508
77622
|
console.log(renderPagesDocument(result, derived, { standard, lang, screenshots: shotsRelative(".") }));
|
|
77509
77623
|
return 0;
|
|
77510
77624
|
}
|
|
77511
|
-
|
|
77625
|
+
mkdirSync19(outDir, { recursive: true });
|
|
77512
77626
|
const manifest = wantEvidence ? writeEvidence(result, { outDir, ...evidenceCapsOf(p) }) : void 0;
|
|
77513
77627
|
const cropFor = manifest ? (f) => {
|
|
77514
77628
|
const c2 = manifest.crops.get(findingId(f));
|
|
@@ -77527,7 +77641,7 @@ async function cmdPages(p) {
|
|
|
77527
77641
|
};
|
|
77528
77642
|
if (!split) {
|
|
77529
77643
|
const file = join53(outDir, `pages-${result.date}.md`);
|
|
77530
|
-
|
|
77644
|
+
writeFileSync22(file, `${renderPagesDocument(result, derived, { standard, lang, screenshots: shotsCopiedInto(outDir), ...evidenceOpts })}
|
|
77531
77645
|
`);
|
|
77532
77646
|
const html2 = wantHtml ? emitHtml(result, {
|
|
77533
77647
|
outDir,
|
|
@@ -77546,11 +77660,11 @@ async function cmdPages(p) {
|
|
|
77546
77660
|
const sheet = (id) => `page-${id}.md`;
|
|
77547
77661
|
const hrefs = new Map(derived.map((pg) => [pg.id, `./${sheet(pg.id)}`]));
|
|
77548
77662
|
for (const pg of derived) {
|
|
77549
|
-
|
|
77663
|
+
writeFileSync22(join53(outDir, sheet(pg.id)), `${renderPageDocument(result, pg, { standard, lang, screenshots: shots, ...evidenceOpts })}
|
|
77550
77664
|
`);
|
|
77551
77665
|
}
|
|
77552
77666
|
const index = join53(outDir, "index.md");
|
|
77553
|
-
|
|
77667
|
+
writeFileSync22(index, `${renderPagesIndex(result, derived, { standard, lang, hrefs })}
|
|
77554
77668
|
`);
|
|
77555
77669
|
const html = wantHtml ? emitHtml(result, {
|
|
77556
77670
|
outDir,
|
|
@@ -77687,9 +77801,9 @@ function cmdInit(p) {
|
|
|
77687
77801
|
if (want.baseline) {
|
|
77688
77802
|
const inputs = p.positionals.length ? p.positionals : ["."];
|
|
77689
77803
|
const result = runAudit({ inputs, onWarn: (m) => console.error(m) });
|
|
77690
|
-
|
|
77804
|
+
mkdirSync19(join53(root, "audits"), { recursive: true });
|
|
77691
77805
|
const bp = join53(root, "audits", "baseline.json");
|
|
77692
|
-
|
|
77806
|
+
writeFileSync22(bp, JSON.stringify(result, null, 2) + "\n");
|
|
77693
77807
|
wrote.push(bp);
|
|
77694
77808
|
}
|
|
77695
77809
|
if (want.hook) wrote.push(writeHook(root, engineRel, failOn, legacy ? "baseline" : "staged"));
|
|
@@ -78000,7 +78114,7 @@ async function cmdTickets(p) {
|
|
|
78000
78114
|
const ticketsOut = typeof p.flags.out === "string" && p.flags.out ? p.flags.out : void 0;
|
|
78001
78115
|
let setPath;
|
|
78002
78116
|
if (ticketsOut) {
|
|
78003
|
-
|
|
78117
|
+
mkdirSync19(ticketsOut, { recursive: true });
|
|
78004
78118
|
setPath = join53(ticketsOut, `issues-${result.date}.json`);
|
|
78005
78119
|
const payload = {
|
|
78006
78120
|
tool: "ultra11y",
|
|
@@ -78012,7 +78126,7 @@ async function cmdTickets(p) {
|
|
|
78012
78126
|
count: plan.tickets.length,
|
|
78013
78127
|
issues: plan.tickets
|
|
78014
78128
|
};
|
|
78015
|
-
|
|
78129
|
+
writeFileSync22(setPath, `${JSON.stringify(payload, null, 2)}
|
|
78016
78130
|
`);
|
|
78017
78131
|
if (!json) console.log(setPath);
|
|
78018
78132
|
}
|
|
@@ -78139,14 +78253,14 @@ function cmdRender(p) {
|
|
|
78139
78253
|
const dir = join53(root, ".ultra11y", "e2e");
|
|
78140
78254
|
const paths = {};
|
|
78141
78255
|
try {
|
|
78142
|
-
|
|
78256
|
+
mkdirSync19(dir, { recursive: true });
|
|
78143
78257
|
if (runners.includes("playwright")) {
|
|
78144
|
-
|
|
78258
|
+
writeFileSync22(join53(dir, "playwright.mjs"), playwrightFixture(engineRef));
|
|
78145
78259
|
paths.playwright = ".ultra11y/e2e/playwright.mjs";
|
|
78146
78260
|
}
|
|
78147
78261
|
if (runners.includes("cypress")) {
|
|
78148
|
-
|
|
78149
|
-
|
|
78262
|
+
writeFileSync22(join53(dir, "cypress-plugin.mjs"), cypressPlugin(engineRef));
|
|
78263
|
+
writeFileSync22(join53(dir, "cypress-commands.mjs"), cypressCommands());
|
|
78150
78264
|
paths.cypressPlugin = ".ultra11y/e2e/cypress-plugin.mjs";
|
|
78151
78265
|
paths.cypressCommands = ".ultra11y/e2e/cypress-commands.mjs";
|
|
78152
78266
|
}
|
|
@@ -78161,7 +78275,7 @@ function cmdRender(p) {
|
|
|
78161
78275
|
if (p.flags.scaffold === true) {
|
|
78162
78276
|
const out2 = typeof p.flags.out === "string" && p.flags.out ? p.flags.out : "ultra11y-render.tsx";
|
|
78163
78277
|
try {
|
|
78164
|
-
|
|
78278
|
+
writeFileSync22(out2, ssrHarness());
|
|
78165
78279
|
} catch (e) {
|
|
78166
78280
|
console.error(`ultra11y render: could not write ${out2}: ${e instanceof Error ? e.message : String(e)}`);
|
|
78167
78281
|
return 1;
|
|
@@ -78177,8 +78291,8 @@ Fill in COMPONENTS, run it (e.g. npx tsx ${out2}), then: node scripts/ultra11y.m
|
|
|
78177
78291
|
const rel2 = ".ultra11y/capture-setup.mjs";
|
|
78178
78292
|
const out2 = join53(root, rel2);
|
|
78179
78293
|
try {
|
|
78180
|
-
|
|
78181
|
-
|
|
78294
|
+
mkdirSync19(dirname20(out2), { recursive: true });
|
|
78295
|
+
writeFileSync22(out2, captureSetup());
|
|
78182
78296
|
} catch (e) {
|
|
78183
78297
|
console.error(`ultra11y render: could not write ${out2}: ${e instanceof Error ? e.message : String(e)}`);
|
|
78184
78298
|
return 1;
|
|
@@ -78249,8 +78363,8 @@ Fill in COMPONENTS, run it (e.g. npx tsx ${out2}), then: node scripts/ultra11y.m
|
|
|
78249
78363
|
continue;
|
|
78250
78364
|
}
|
|
78251
78365
|
try {
|
|
78252
|
-
|
|
78253
|
-
|
|
78366
|
+
mkdirSync19(outDir, { recursive: true });
|
|
78367
|
+
writeFileSync22(join53(outDir, `${hitId}.html`), `${formatCaptureComment(prov)}
|
|
78254
78368
|
${raw}${raw.endsWith("\n") ? "" : "\n"}`);
|
|
78255
78369
|
attributed++;
|
|
78256
78370
|
} catch {
|
|
@@ -78580,9 +78694,9 @@ function cmdVerifySummary(p) {
|
|
|
78580
78694
|
return 0;
|
|
78581
78695
|
}
|
|
78582
78696
|
const out2 = typeof p.flags.out === "string" && p.flags.out ? p.flags.out : ".";
|
|
78583
|
-
|
|
78697
|
+
mkdirSync19(out2, { recursive: true });
|
|
78584
78698
|
const mdPath = join53(out2, "TRIAL.md");
|
|
78585
|
-
|
|
78699
|
+
writeFileSync22(mdPath, formatTrialSummary(summary, lang));
|
|
78586
78700
|
console.log(
|
|
78587
78701
|
summary.validated ? lang === "fr" ? `\u2713 Bilan de contre-expertise \u2192 ${mdPath} \u2014 gate s\xE9mantique vert.` : `\u2713 Counter-review summary \u2192 ${mdPath} \u2014 semantic gate green.` : lang === "fr" ? `Bilan de contre-expertise \u2192 ${mdPath} \u2014 audit NON valid\xE9 (gate ${summary.gate.ok ? "vert" : "en \xE9chec"}, ${summary.contestedEngine.length} d\xE9cision(s) moteur contest\xE9e(s), ${summary.untried.length} jamais mise(s) \xE0 l'\xE9preuve, ${summary.foreign.length} \xE9trang\xE8re(s)).` : `Counter-review summary \u2192 ${mdPath} \u2014 audit NOT validated (gate ${summary.gate.ok ? "green" : "failing"}, ${summary.contestedEngine.length} contested engine decision(s), ${summary.untried.length} never tried, ${summary.foreign.length} foreign).`
|
|
78588
78702
|
);
|
|
@@ -78624,8 +78738,8 @@ function applyPrune(p, standard, items, lang, untried = []) {
|
|
|
78624
78738
|
ledgerRepair = pruneLedger(ledger, items, pruned.reopenedCriteria, pruned.clearedConformities, root);
|
|
78625
78739
|
}
|
|
78626
78740
|
const out2 = typeof p.flags.out === "string" ? p.flags.out : ".";
|
|
78627
|
-
|
|
78628
|
-
|
|
78741
|
+
mkdirSync19(out2, { recursive: true });
|
|
78742
|
+
writeFileSync22(join53(out2, "audit-latest.json"), JSON.stringify(auditDocumentFor(pruned.audit, standard, lang), null, 2) + "\n");
|
|
78629
78743
|
if (ledgerFile && ledgerRepair) {
|
|
78630
78744
|
writeLedger(ledgerFile, ledgerRepair.ledger);
|
|
78631
78745
|
if (!p.flags.json)
|
|
@@ -78866,9 +78980,9 @@ function replayLedgerFile(p, ledger, lang) {
|
|
|
78866
78980
|
return 1;
|
|
78867
78981
|
}
|
|
78868
78982
|
const out2 = typeof p.flags.out === "string" ? p.flags.out : ".";
|
|
78869
|
-
|
|
78983
|
+
mkdirSync19(out2, { recursive: true });
|
|
78870
78984
|
const auditPath = join53(out2, "audit-latest.json");
|
|
78871
|
-
|
|
78985
|
+
writeFileSync22(auditPath, `${JSON.stringify(auditDocumentFor(r.audit, standard, lang), null, 2)}
|
|
78872
78986
|
`);
|
|
78873
78987
|
if (p.flags.json)
|
|
78874
78988
|
console.log(
|
|
@@ -78945,9 +79059,9 @@ function applyAdjudicationFile(p, adj, lang) {
|
|
|
78945
79059
|
for (const i2 of r.issues) console.error(` \u2717 ${i2}`);
|
|
78946
79060
|
}
|
|
78947
79061
|
const out2 = typeof p.flags.out === "string" ? p.flags.out : ".";
|
|
78948
|
-
|
|
79062
|
+
mkdirSync19(out2, { recursive: true });
|
|
78949
79063
|
const auditPath = join53(out2, "audit-latest.json");
|
|
78950
|
-
|
|
79064
|
+
writeFileSync22(auditPath, JSON.stringify(auditDocumentFor(r.audit, adj.standard, lang), null, 2) + "\n");
|
|
78951
79065
|
const ledgerOut = ledgerTarget(p, adj.standard);
|
|
78952
79066
|
if (ledgerOut) {
|
|
78953
79067
|
const blind = unreadableCaptures(r.audit);
|
|
@@ -79084,7 +79198,7 @@ async function cmdRefute(p, todoPath) {
|
|
|
79084
79198
|
`ultra11y judge: batch #${batch.map((item) => item.n).join(", #")} (${batch.map((item) => item.criteriaId).join(", ")}) \u2014 ${e instanceof Error ? e.message : String(e)}`
|
|
79085
79199
|
);
|
|
79086
79200
|
}
|
|
79087
|
-
|
|
79201
|
+
writeFileSync22(todoPath, JSON.stringify(items, null, 2) + "\n");
|
|
79088
79202
|
}
|
|
79089
79203
|
};
|
|
79090
79204
|
await Promise.all(Array.from({ length: Math.min(lanes, queue.length) }, worker));
|
|
@@ -79199,7 +79313,7 @@ async function cmdJudge(p) {
|
|
|
79199
79313
|
{ cwd }
|
|
79200
79314
|
);
|
|
79201
79315
|
if (partial.applied > 0)
|
|
79202
|
-
|
|
79316
|
+
writeFileSync22(join53(outDir, "audit-latest.json"), `${JSON.stringify(auditDocumentFor(partial.audit, standard, lang), null, 2)}
|
|
79203
79317
|
`);
|
|
79204
79318
|
} catch {
|
|
79205
79319
|
}
|
|
@@ -79268,9 +79382,9 @@ async function cmdJudge(p) {
|
|
|
79268
79382
|
for (const i2 of r.issues.slice(0, 40)) console.error(` \u2717 ${i2}`);
|
|
79269
79383
|
if (r.issues.length > 40) console.error(` \u2026 +${r.issues.length - 40}`);
|
|
79270
79384
|
}
|
|
79271
|
-
|
|
79385
|
+
mkdirSync19(out2, { recursive: true });
|
|
79272
79386
|
const auditPath = join53(out2, "audit-latest.json");
|
|
79273
|
-
|
|
79387
|
+
writeFileSync22(auditPath, `${JSON.stringify(auditDocumentFor(r.audit, adj.standard, lang), null, 2)}
|
|
79274
79388
|
`);
|
|
79275
79389
|
const ledgerOut = ledgerTarget(p, adj.standard);
|
|
79276
79390
|
if (ledgerOut) {
|
|
@@ -79528,9 +79642,9 @@ async function cmdScan(p) {
|
|
|
79528
79642
|
attributePages(merged, scope);
|
|
79529
79643
|
}
|
|
79530
79644
|
}
|
|
79531
|
-
|
|
79645
|
+
mkdirSync19(out2, { recursive: true });
|
|
79532
79646
|
const mergedDocument = auditDocumentFor(merged, standard, lang);
|
|
79533
|
-
|
|
79647
|
+
writeFileSync22(join53(out2, "audit-latest.json"), JSON.stringify(mergedDocument, null, 2) + "\n");
|
|
79534
79648
|
if (p.flags.json)
|
|
79535
79649
|
console.log(
|
|
79536
79650
|
JSON.stringify(
|
|
@@ -79788,9 +79902,9 @@ async function cmdImport(p) {
|
|
|
79788
79902
|
return 1;
|
|
79789
79903
|
}
|
|
79790
79904
|
if (outDir) {
|
|
79791
|
-
|
|
79905
|
+
mkdirSync19(outDir, { recursive: true });
|
|
79792
79906
|
const rawFile = join53(outDir, `external-${adapterId}-${arg}.raw.json`);
|
|
79793
|
-
|
|
79907
|
+
writeFileSync22(rawFile, rawText.endsWith("\n") ? rawText : `${rawText}
|
|
79794
79908
|
`);
|
|
79795
79909
|
if (!p.flags.json) console.log(rawFile);
|
|
79796
79910
|
}
|
|
@@ -79824,9 +79938,9 @@ async function cmdImport(p) {
|
|
|
79824
79938
|
return 0;
|
|
79825
79939
|
}
|
|
79826
79940
|
if (outDir) {
|
|
79827
|
-
|
|
79941
|
+
mkdirSync19(outDir, { recursive: true });
|
|
79828
79942
|
const file = join53(outDir, "external-latest.json");
|
|
79829
|
-
|
|
79943
|
+
writeFileSync22(file, `${JSON.stringify(audit2, null, 2)}
|
|
79830
79944
|
`);
|
|
79831
79945
|
console.log(file);
|
|
79832
79946
|
} else {
|
|
@@ -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.
|
|
6
|
+
version: 5.54.0
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# review-a11y — accessibility review of changed code
|