ultra11y 6.0.0 → 7.0.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 +22 -287
- package/package.json +1 -6
- package/scripts/ultra11y.mjs +1245 -7814
- package/skills/review-a11y/SKILL.md +1 -1
- package/skills/review-a11y/scripts/ultra11y.mjs +1245 -7814
- package/skills/ultra11y/SKILL.md +26 -43
- package/skills/ultra11y/references/automation.md +7 -28
- package/skills/ultra11y/references/ci.md +9 -51
- package/skills/ultra11y/references/dynamic.md +28 -39
- package/skills/ultra11y/references/e2e.md +5 -25
- package/skills/ultra11y/references/false-positives.md +1 -1
- package/skills/ultra11y/references/focus-and-logic.md +1 -1
- package/skills/ultra11y/references/full-audit.md +9 -12
- package/skills/ultra11y/references/guidance.md +2 -2
- package/skills/ultra11y/references/harnesses.md +15 -38
- package/skills/ultra11y/references/judgment.md +9 -40
- package/skills/ultra11y/references/media-and-motion.md +1 -1
- package/skills/ultra11y/references/methodology.md +3 -3
- package/skills/ultra11y/references/orchestrators.md +5 -6
- package/skills/ultra11y/references/packs.md +5 -7
- package/skills/ultra11y/references/pages.md +3 -36
- package/skills/ultra11y/references/prd.md +0 -4
- package/skills/ultra11y/references/rendered.md +1 -1
- package/skills/ultra11y/references/runbook.md +18 -25
- package/skills/ultra11y/references/standards.md +5 -2
- package/skills/ultra11y/references/tickets.md +1 -1
- package/skills/ultra11y/scripts/ultra11y.mjs +1245 -7814
- package/src/adjudicate.ts +10 -11
- package/src/adjudication-data.ts +2 -3
- package/src/audit.ts +2 -7
- package/src/axe-map.ts +2 -2
- package/src/baseline.ts +6 -50
- package/src/capture.ts +1 -1
- package/src/cli.ts +179 -1679
- package/src/config.ts +1 -1
- package/src/crawl.ts +1 -1
- package/src/criteria.ts +83 -0
- package/src/evidence.ts +1 -1
- package/src/gh-cli.ts +2 -4
- package/src/graph/spec-resolve.ts +1 -1
- package/src/html-emit.ts +1 -11
- package/src/init.ts +9 -92
- package/src/install/agents-md.ts +1 -2
- package/src/integrations/core.ts +0 -3
- package/src/md.ts +1 -1
- package/src/pages.ts +3 -3
- package/src/prd.ts +7 -65
- package/src/probes.ts +1 -1
- package/src/render.ts +2 -2
- package/src/report.ts +4 -4
- package/src/rules/rendered.ts +2 -2
- package/src/rules/rule.ts +1 -1
- package/src/scan-local.ts +18 -26
- package/src/scan.ts +16 -337
- package/src/snapshot.ts +1 -1
- package/src/standards/derive.ts +3 -4
- package/src/standards/document.ts +4 -4
- package/src/standards/registry.ts +6 -9
- package/src/tickets/grain.ts +2 -5
- package/src/tickets/http.ts +1 -1
- package/src/tickets/render.ts +1 -24
- package/src/tickets/types.ts +0 -2
- package/src/types.ts +17 -17
- package/src/util.ts +5 -5
- package/src/verdict-rules.ts +2 -1
- package/src/verify.ts +4 -136
- package/src/walk.ts +2 -3
- package/docker/Dockerfile +0 -7
- package/docker/package.json +0 -9
- package/docker/runner.mjs +0 -49
- package/skills/ultra11y/references/devtools.md +0 -67
- package/skills/ultra11y/references/mcp.md +0 -232
- package/src/affected.ts +0 -512
- package/src/agent-cli.ts +0 -374
- package/src/agent-codex.ts +0 -257
- package/src/annotate.ts +0 -1070
- package/src/criteria-view.ts +0 -473
- package/src/dev.ts +0 -424
- package/src/e2e.ts +0 -320
- package/src/external/adapters/ara.ts +0 -164
- package/src/external/diff.ts +0 -143
- package/src/external/registry.ts +0 -22
- package/src/external/types.ts +0 -59
- package/src/lite.ts +0 -324
- package/src/llm.ts +0 -424
- package/src/mcp/handlers.ts +0 -822
- package/src/mcp/http.ts +0 -260
- package/src/mcp/prompts.ts +0 -194
- package/src/mcp/protocol.ts +0 -186
- package/src/mcp/resources.ts +0 -135
- package/src/mcp/server.ts +0 -242
- package/src/mcp/standards-resources.ts +0 -174
- package/src/mcp/stdio.ts +0 -119
- package/src/mcp/tools.ts +0 -590
- package/src/method-view.ts +0 -234
- package/src/pr-comment.ts +0 -114
- package/src/project-lock.ts +0 -42
- package/src/sarif.ts +0 -230
|
@@ -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": "
|
|
13
|
+
"version": "7.0.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": "
|
|
4
|
+
"version": "7.0.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": "
|
|
4
|
+
"version": "7.0.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",
|
|
@@ -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 = "
|
|
47
|
+
const ULTRA11Y_PLUGIN_VERSION = "7.0.0";
|
|
48
48
|
const PLUGIN_ID = "ultra11y";
|
|
49
49
|
const SKILL_NAMES = ["ultra11y", "review-a11y"];
|
|
50
50
|
|
package/README.md
CHANGED
|
@@ -33,7 +33,7 @@ ultra11y is built around an honest **division of labour**. Automated tools only
|
|
|
33
33
|
- **Agent judgment (gated):** alt-text relevance, link purpose in context, reading/tab order, caption accuracy — the agent rules on these via `verify --manual` → `--apply`, each verdict carrying a justification (or a groundable NC), never a silent "conforming".
|
|
34
34
|
- **Needs rendering (scan tier):** computed contrast, visible focus, zoom/reflow, content on hover — decided by `scan` (axe-core in a real browser); until then they stay **residual risks**, never silently "conforming".
|
|
35
35
|
- **Advisory vs non-conformity:** a good practice with no failing normative test (an `advisory` pack rule, a best-practice-only axe violation, an agent recommendation) renders as « Recommandation (non normative) » — it never flips a criterion to `NC` nor enters the conformance rate. An NC always cites a `normativeRef`.
|
|
36
|
-
- **Stateful scan probes:** the
|
|
36
|
+
- **Stateful scan probes:** the scan drives the page with bounded, non-navigating interactions (fill inputs then re-measure overflow; a live-region probe for status messages 4.1.3) — `--no-interact` opts out; `--interact-clicks` re-enables button clicks on authenticated scans (destructive-named buttons are never clicked).
|
|
37
37
|
- **Normative page sample (échantillon):** a country-standard audit runs over a declared `sample.pages` set — **`pages discover --crawl|--sitemap --write` builds it for you** (names read from each page's `<title>`, existing entries never overwritten), `sample check` lints its coverage against the standard's required page kinds, `scan --sample` scans it, and an un-scanned `--standard rgaa` report is flagged **partial**.
|
|
38
38
|
- **Pack-only detection (declarative):** a standards pack can ship its own `rules` (a bounded, ReDoS-guarded matcher DSL — no code) and normativity/severity `overrides`, projecting onto its criteria without forking the engine.
|
|
39
39
|
|
|
@@ -119,12 +119,6 @@ Disable it per-repo with `"hook": { "failOn": "off" }` in `.ultra11yrc.json`, pe
|
|
|
119
119
|
with `SKIP_A11Y=1`, or per-session with `ULTRA11Y_HOOK=off`; raise or lower the bar with
|
|
120
120
|
`ULTRA11Y_HOOK_FAIL_ON=blocking|major|minor` (default `blocking`).
|
|
121
121
|
|
|
122
|
-
**As an MCP server** — so an agent drives the engine as tools instead of shelling out:
|
|
123
|
-
|
|
124
|
-
```sh
|
|
125
|
-
claude mcp add ultra11y -- npx -y ultra11y mcp
|
|
126
|
-
```
|
|
127
|
-
|
|
128
122
|
**In CI — run iterion's [`rgaa-audit` bot](https://github.com/SocialGouv/iterion/tree/main/bots/rgaa-audit).**
|
|
129
123
|
ultra11y ships no CI integration of its own. The bot is the harness that turns the engine into an
|
|
130
124
|
audit with no one at the keyboard: it installs the engine pinned (version and sha256), renders
|
|
@@ -142,160 +136,34 @@ node scripts/ultra11y.mjs --help
|
|
|
142
136
|
|
|
143
137
|
```
|
|
144
138
|
ultra11y audit <globs… | -> [--standard <pack>] [--out <dir>] [--include <glob>] [--exclude <glob>] [--ext <list>] [--jsx] [--graph] [--json] [--lang auto|en|fr] [--no-default-excludes]
|
|
145
|
-
ultra11y audit [--changed | --since <ref> | --staged] [--max-files <n>] [--dedup exact|normalized|off] [--
|
|
139
|
+
ultra11y audit [--changed | --since <ref> | --staged] [--max-files <n>] [--dedup exact|normalized|off] [--fail-on blocking|major|minor]
|
|
146
140
|
ultra11y audit [--captures <dir>] [--no-captures] [--require-captures] # audit rendered-DOM captures alongside source
|
|
147
|
-
ultra11y audit
|
|
148
|
-
ultra11y
|
|
149
|
-
ultra11y affected --since <ref> | --all [--root <dir>] [--json] # the sample pages a diff can change
|
|
150
|
-
ultra11y report --in <audit.json> [--out <dir>] [--standard <pack>] [--format sarif|github] [--lang auto|en|fr]
|
|
151
|
-
ultra11y prd --in <audit.json> [--out <dir>] [--split criterion] [--format audit|doc|remediation] [--standard <pack>] [--lang auto|en|fr]
|
|
141
|
+
ultra11y report --in <audit.json> [--out <dir>] [--standard <pack>] [--html] [--evidence] [--lang auto|en|fr]
|
|
142
|
+
ultra11y prd --in <audit.json> [--out <dir>] [--split criterion] [--format audit|doc] [--standard <pack>] [--lang auto|en|fr]
|
|
152
143
|
ultra11y tickets --in <audit.json> [--provider auto|github|gitlab|jira] [--grain criterion|page|page-criterion|single|file] [--transport auto|cli|rest] [--max-tickets <n>] [--dry-run] [--json]
|
|
153
|
-
ultra11y render [<dir>] [--scaffold | --setup | --
|
|
144
|
+
ultra11y render [<dir>] [--scaffold | --setup | --coverage | --storybook] [--captures <dir>] [--out <file>] [--json]
|
|
154
145
|
ultra11y snapshot write [--root <dir>] [--fail-on blocking|major|minor] [--json] # payload on stdin → .ultra11y/pages/<id>/ + audit
|
|
155
146
|
ultra11y snapshot list [--root <dir>] [--json]
|
|
156
147
|
ultra11y pages --in <audit.json> [--standard <pack>] [--json] [--lang auto|en|fr] # the per-page criterion grid
|
|
157
148
|
ultra11y pages --in <audit.json> --format report [--split page] [--out <dir>] # the per-page report, with screenshots
|
|
158
149
|
ultra11y pages discover --sitemap <url> | --crawl <url> [--depth <n>] [--max <n>] [--write] # build the page sample
|
|
159
|
-
ultra11y dev [--port <n>] [--standard <pack>] | dev --next # live overlay while you build + dashboard
|
|
160
150
|
ultra11y criteria [<sc>] [--list] [--standard <pack> [--theme <N>]] [--generate] [--json] [--lang auto|en|fr]
|
|
161
|
-
ultra11y
|
|
151
|
+
ultra11y criteria --standard <pack> --glossary [<term>] | criteria [--standard <pack>] --plan # defined terms · the work plan
|
|
162
152
|
ultra11y check --report <md> [--standard <pack>] [--quiet] [--json]
|
|
153
|
+
ultra11y check --in <audit.json> --require-decided[=pages] [--allow-undecided <file>] [--require-rendered]
|
|
163
154
|
ultra11y verify --report <md> [--standard <pack>] [--semantic] [--apply <verdicts.json>] [--max-verify <n>] [--json]
|
|
164
155
|
ultra11y verify --report <md> [--conformities <ledger|adjudication.json> | --no-conformities] # also put the claimed CONFORMITIES on trial
|
|
156
|
+
ultra11y verify --report <md> --in <audit.json> --manual | verify --apply <adjudication.json> --in <audit.json> [--ledger]
|
|
157
|
+
ultra11y orchestrate --run <dir> [--phase adjudicate|verify-report] [--eco] [--manifest] # fan the judgment out to subagents
|
|
165
158
|
ultra11y fix <globs… | -> [--write] [--iterate] [--changed | --since <ref> | --staged] [--safe] [--only <ids>] [--jsx] [--json]
|
|
166
|
-
ultra11y init [--hook] [--
|
|
159
|
+
ultra11y init [--hook] [--fail-on blocking|major|minor]
|
|
167
160
|
ultra11y pack check <pack.json> [--guidance <g.json>] | scaffold # gate an (AI-)authored standards pack
|
|
168
|
-
ultra11y scan <url|file…> [--
|
|
169
|
-
ultra11y scan --sitemap <url> | --crawl <url> [--depth <n>] [--max <n>] [--
|
|
170
|
-
ultra11y mcp [--transport stdio|http] [--cwd <dir>] [--allow-write] [--port <n>] [--bind <addr>] [--allow-remote]
|
|
161
|
+
ultra11y scan <url|file…> [--cwd <dir>] [--root <dir>] [--storage-state <file>] [--merge <audit.json>] [--out <dir>] [--json]
|
|
162
|
+
ultra11y scan --sample | --sitemap <url> | --crawl <url> [--depth <n>] [--max <n>] [--merge <audit.json>] [--json]
|
|
171
163
|
|
|
172
164
|
# global: --pack <paths> (load external standards pack(s) at runtime) · --override
|
|
173
165
|
```
|
|
174
166
|
|
|
175
|
-
## Use it as an MCP server
|
|
176
|
-
|
|
177
|
-
The skill shells out to the CLI and parses its output. An MCP server skips both:
|
|
178
|
-
your agent calls ultra11y as typed tools, with JSON schemas in and structured
|
|
179
|
-
results out. Same engine, same standards data, no wrapper.
|
|
180
|
-
|
|
181
|
-
```bash
|
|
182
|
-
# stdio — the default, and what Claude Code / Claude Desktop / Cursor expect
|
|
183
|
-
claude mcp add ultra11y -- node /abs/path/to/scripts/ultra11y.mjs mcp
|
|
184
|
-
|
|
185
|
-
# or over HTTP, on loopback
|
|
186
|
-
node scripts/ultra11y.mjs mcp --transport http --port 7341
|
|
187
|
-
claude mcp add --transport http ultra11y http://127.0.0.1:7341/mcp
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
```jsonc
|
|
191
|
-
// Claude Desktop takes stdio servers only — a remote URL here will not work.
|
|
192
|
-
{ "mcpServers": { "ultra11y": { "command": "node", "args": ["/abs/path/to/scripts/ultra11y.mjs", "mcp"] } } }
|
|
193
|
-
// Cursor, HTTP:
|
|
194
|
-
{ "mcpServers": { "ultra11y": { "url": "http://127.0.0.1:7341/mcp" } } }
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
It serves all three MCP primitives, because a skill is three things: the engine
|
|
198
|
-
(**tools**), the method (**prompts**), and the documentation the method refers
|
|
199
|
-
to (**resources**). A client given only the tools runs the audit, sees no
|
|
200
|
-
errors, and reports the page as accessible — a false conformance claim, which is
|
|
201
|
-
the one output an accessibility tool must never produce.
|
|
202
|
-
|
|
203
|
-
### Tools
|
|
204
|
-
|
|
205
|
-
Sixteen read tools, in two blocks. **The audit block** tells you what the page does:
|
|
206
|
-
|
|
207
|
-
| Tool | What it does |
|
|
208
|
-
|------|--------------|
|
|
209
|
-
| `ultra11y_audit` | The static pass — findings keyed by success criterion |
|
|
210
|
-
| `ultra11y_adjudicate` | The criteria the engine **cannot** decide, with their evidence |
|
|
211
|
-
| `ultra11y_report` | The dated conformance report, WCAG or a country pack |
|
|
212
|
-
| `ultra11y_prd` | Non-conformities → remediation units with effort |
|
|
213
|
-
| `ultra11y_tickets` | The same backlog as a ticket plan — dry-run, files nothing |
|
|
214
|
-
| `ultra11y_check` | The gate: nothing asserted conformant that was never tested |
|
|
215
|
-
| `ultra11y_verify` | Claim↔evidence worklist |
|
|
216
|
-
| `ultra11y_pack_check` | Validate a country standards pack against what it really ships |
|
|
217
|
-
| `ultra11y_sample_check` | Lint the normative page sample |
|
|
218
|
-
| `ultra11y_pages` | The per-page view: the criterion × page grid, or one dossier per page |
|
|
219
|
-
| `ultra11y_read` | A file, or a line range, from the project |
|
|
220
|
-
|
|
221
|
-
**The reference block** tells you what the standard requires — the half that keeps an agent
|
|
222
|
-
from auditing out of memory. `cwd` is optional on all five; it selects whose packs are visible:
|
|
223
|
-
|
|
224
|
-
| Tool | What it does |
|
|
225
|
-
|------|--------------|
|
|
226
|
-
| `ultra11y_standards` | Which standards exist here, and how much of each any engine can decide |
|
|
227
|
-
| `ultra11y_criteria` | One criterion in full — wording, **numbered tests**, techniques, mapping, defined terms — or the index, or one theme |
|
|
228
|
-
| `ultra11y_glossary` | What a term the standard **defines** means, and which criteria it governs |
|
|
229
|
-
| `ultra11y_guidance` | The before/after implementation pattern, inherited through the WCAG mapping when the pack has none |
|
|
230
|
-
| `ultra11y_method` | The work plan: what the engine settles, what needs a render, what is yours |
|
|
231
|
-
|
|
232
|
-
`ultra11y_method` is the one to call first. It partitions the standard into evidence tiers —
|
|
233
|
-
`source`, `cross-file`, `rendered-page`, `browser`, `judgment`, `out-of-scope` — from the
|
|
234
|
-
engine's own per-criterion rule applicability, never from guessing at the wording of a test.
|
|
235
|
-
For RGAA it reports that **56 of 106 criteria declare that no engine rule can evidence them**.
|
|
236
|
-
That is the standard saying they are yours, and a plan that hides it reads as coverage that
|
|
237
|
-
does not exist.
|
|
238
|
-
|
|
239
|
-
`standard` carries no enum, deliberately: a country pack arrives with a project, so an enum
|
|
240
|
-
pinned when the tool list was built would reject a pack that is perfectly valid for the
|
|
241
|
-
project being asked about. The handler validates against the registry and names what it knows.
|
|
242
|
-
|
|
243
|
-
`--allow-write` additionally exposes `ultra11y_fix` (safe codemods, dry-run by
|
|
244
|
-
default), `ultra11y_fold` (lands the verdicts you wrote on the `ultra11y_adjudicate`
|
|
245
|
-
worklist — `verify --apply` over MCP: same gate, partial by default with every refusal
|
|
246
|
-
listed, dry-run unless `write: true`, `ledger: true` to record the accepted verdicts) and
|
|
247
|
-
`ultra11y_init` (hook/CI/baseline) — the tools that change **your** project. `ultra11y_scan` is declared but declines over MCP: it drives a headless
|
|
248
|
-
browser and may pull a Docker image, which is not a subprocess lifecycle a
|
|
249
|
-
long-lived server should own. It tells you to run it from the CLI and re-audit.
|
|
250
|
-
|
|
251
|
-
Every tool audits exactly what the CLI would: the rendered captures and the page
|
|
252
|
-
snapshots under `.ultra11y/` are ingested here too, so the server never reports a
|
|
253
|
-
smaller audit than the same command run by hand.
|
|
254
|
-
|
|
255
|
-
Pass `--cwd <dir>` at startup to dedicate the server to one project — `cwd` then
|
|
256
|
-
becomes optional on every tool.
|
|
257
|
-
|
|
258
|
-
### Prompts — the workflow, not just the tools
|
|
259
|
-
|
|
260
|
-
| Prompt | Arguments | What it drives |
|
|
261
|
-
|--------|-----------|----------------|
|
|
262
|
-
| `audit_wcag` | `cwd`, `globs?`, `standard?` | audit → adjudicate → rule on each → report → check, with the untested criteria named |
|
|
263
|
-
| `adjudicate_criteria` | `cwd`, `standard?` | What alt-text relevance, link purpose, heading structure and reading order actually ask |
|
|
264
|
-
| `review_diff_a11y` | `cwd`, `since?` | Audit exactly the diff, refute the false positives, state the residual risks |
|
|
265
|
-
|
|
266
|
-
Each carries the coverage arithmetic: of the 55 WCAG 2.2 AA criteria the static
|
|
267
|
-
engine decides a handful, a browser decides fourteen, and **thirty-eight are
|
|
268
|
-
yours**.
|
|
269
|
-
|
|
270
|
-
### Resources — the documentation, and the standards themselves
|
|
271
|
-
|
|
272
|
-
`SKILL.md` and all 37 `references/*.md` are served under `skill://`, read off
|
|
273
|
-
disk at request time — so a documentation fix reaches every client without a
|
|
274
|
-
rebuild.
|
|
275
|
-
|
|
276
|
-
The standards are served too, under `std://`, because in MCP documentation is a
|
|
277
|
-
*resource*, not a tool call:
|
|
278
|
-
|
|
279
|
-
```
|
|
280
|
-
std://rgaa/criteria/8.3 std://rgaa/glossary/lien std://rgaa/method
|
|
281
|
-
std://rgaa/themes/8 std://rgaa/guidance/13.2 std://rgaa/pack.json
|
|
282
|
-
std://wcag/criteria/1.4.3 std://wcag/glossary std://wcag/method
|
|
283
|
-
```
|
|
284
|
-
|
|
285
|
-
`resources/list` carries a bounded index per standard; the per-item URIs are
|
|
286
|
-
**templates** (`resources/templates/list`), because enumerating RGAA's 106
|
|
287
|
-
criteria and 119 glossary terms would bloat every client's listing and go stale
|
|
288
|
-
the moment a project's own pack registers.
|
|
289
|
-
|
|
290
|
-
Two things worth knowing:
|
|
291
|
-
|
|
292
|
-
- **A criterion nobody tested is untested, never conformant.** Every tool
|
|
293
|
-
description and every prompt says so, because the failure mode here is not a
|
|
294
|
-
wrong answer — it is a confident silence.
|
|
295
|
-
- **The HTTP transport binds `127.0.0.1` and refuses anything else** unless you
|
|
296
|
-
pass `--allow-remote`. This server reads local files; an exposed port is a
|
|
297
|
-
read-anything primitive for whoever finds it.
|
|
298
|
-
|
|
299
167
|
## Standards packs (RGAA France first; add your country)
|
|
300
168
|
|
|
301
169
|
WCAG 2.2 AA is the ENGINE's canonical key, because its rules are tied to success criteria and
|
|
@@ -308,11 +176,12 @@ node scripts/ultra11y.mjs audit src --standard rgaa
|
|
|
308
176
|
node scripts/ultra11y.mjs audit src --standard rgaa --out audits --json # a pack-keyed document: 106 criteria, 13 themes
|
|
309
177
|
node scripts/ultra11y.mjs report --in audits/audit-latest.json --standard rgaa # → audits/rgaa-YYYY-MM-DD.md
|
|
310
178
|
node scripts/ultra11y.mjs criteria --standard rgaa 8.3 # a pack criterion (+ its WCAG SCs)
|
|
179
|
+
node scripts/ultra11y.mjs criteria --standard rgaa --plan # the work plan: what each evidence tier settles
|
|
311
180
|
```
|
|
312
181
|
|
|
313
182
|
`.ultra11yrc.json { "standard": "rgaa" }` makes it the default for every command. Under a pack,
|
|
314
|
-
no deliverable carries a WCAG cross-reference — report, PRD, per-page sheets
|
|
315
|
-
|
|
183
|
+
no deliverable carries a WCAG cross-reference — report, PRD, tickets and per-page sheets name
|
|
184
|
+
that standard's criteria and nothing else; the WCAG core travels inside the
|
|
316
185
|
document's `core` field, where the pipeline reads it and no rendering does. The one place the
|
|
317
186
|
mapping is still printed is `criteria --standard rgaa <id>`, which is a reference lookup and
|
|
318
187
|
where a reader goes looking for it.
|
|
@@ -385,9 +254,7 @@ or malformed file is reported unreadable. See `skills/ultra11y/references/audit.
|
|
|
385
254
|
no new non-conformity, and never on lossy JSX/TSX. See `references/fix.md`.
|
|
386
255
|
- **During your E2E run** — `import { checkA11y } from "ultra11y/playwright"` (or
|
|
387
256
|
`ultra11y/cypress` + `ultra11y/cypress/plugin`) audits a targeted page **inside the test run
|
|
388
|
-
you already have
|
|
389
|
-
not depend on ultra11y, and the two cannot drift (the fixtures interpolate the published
|
|
390
|
-
module's tables, and a test gates both over the same findings). Cypress now feeds the pixel
|
|
257
|
+
you already have**. Cypress feeds the pixel
|
|
391
258
|
tier too, via `after:screenshot`. `checkA11y(page, { report: true })` emits the per-page
|
|
392
259
|
report straight out of the run. The audit runs, so the page is checked in the state
|
|
393
260
|
your test built (logged in, form filled, modal open) — state a separate `scan` run does not
|
|
@@ -397,12 +264,6 @@ or malformed file is reported unreadable. See `skills/ultra11y/references/audit.
|
|
|
397
264
|
a snapshot is a full document, the page-scoped rules finally run — RGAA **8.3** (`lang`),
|
|
398
265
|
**8.5/8.6** (`title`) — and every finding carries both its page and the source file that
|
|
399
266
|
rendered it. See `references/e2e.md` and `references/pages.md`.
|
|
400
|
-
- **While you build** — `dev --next` writes a one-line Next overlay component and `dev` starts
|
|
401
|
-
a loopback side-car: a floating panel lists the current page's non-conformities as you
|
|
402
|
-
browse, each linking to its `file:line` in your editor, and `http://127.0.0.1:4111` shows
|
|
403
|
-
the per-page grid accumulating. The overlay detaches itself before collecting — otherwise it
|
|
404
|
-
would audit itself and shift every element index — and renders nothing outside development.
|
|
405
|
-
See `references/devtools.md`.
|
|
406
267
|
- **A country standard is adjudicated at its OWN granularity** — 97 of RGAA's 106 criteria
|
|
407
268
|
carry at least one judgment test and can still need adjudication to earn C; decisive rules
|
|
408
269
|
can nevertheless prove their bounded failures.
|
|
@@ -414,7 +275,7 @@ or malformed file is reported unreadable. See `skills/ultra11y/references/audit.
|
|
|
414
275
|
an unrelated RGAA test number. Verdicts fold into a separate `packAdjudication` layer so a
|
|
415
276
|
pack decision never rewrites the WCAG core. See `references/judgment.md`.
|
|
416
277
|
- **Rendered tier (offline)** — six rules read a snapshot's browser-only signals inside the
|
|
417
|
-
ordinary `audit`: **no browser, no
|
|
278
|
+
ordinary `audit`: **no browser, no running server**. `rendered-contrast` measures
|
|
418
279
|
contrast on the *computed* styles (the inline-literal rule could only see colours written in
|
|
419
280
|
the markup); `rendered-contrast-pixel` measures it **on the screenshot** for text over a
|
|
420
281
|
gradient or image, where `background-color` is transparent and every CSSOM-based checker —
|
|
@@ -459,129 +320,21 @@ or malformed file is reported unreadable. See `skills/ultra11y/references/audit.
|
|
|
459
320
|
which drives the engine CLI pinned, adjudicates and refutes with read-only agents, and files
|
|
460
321
|
the issues. The CLI it calls — `audit`, `scan --sample`, `verify --manual`/`--apply`/`--report`,
|
|
461
322
|
`check`, `report`, `pages`, `tickets` — is the engine's stable contract. See `references/ci.md`.
|
|
462
|
-
- **CI surfaces** — a red job says *that* the build broke, not *where*. `--format sarif` emits
|
|
463
|
-
SARIF 2.1.0 for GitHub code scanning, so each finding lands as an **inline annotation on the
|
|
464
|
-
causing line** of the PR; `--format github` does the same via `::error::` workflow commands
|
|
465
|
-
plus a `$GITHUB_STEP_SUMMARY` table, for plans without code scanning. Alert identity reuses
|
|
466
|
-
the baseline's `findingId`, so an alert survives line drift; a URL-keyed finding gets **no**
|
|
467
|
-
location rather than a guessed one. Run it from `report --standard rgaa` for pack-keyed
|
|
468
|
-
output. `ULTRA11Y_PR_COMMENT=1` also keeps one sticky PR comment per standard and kind
|
|
469
|
-
(`digest`, `pages`, `full`), edited in place. See `references/ci.md`.
|
|
470
323
|
- **Automation** — `init --hook` (default) wires a zero-dependency git pre-commit gate over the
|
|
471
324
|
**strict staged snapshot**: it audits the exact index blobs, auto-applies the safe fixes and
|
|
472
|
-
re-stages them, and blocks only on judgment issues.
|
|
473
|
-
regression variant (hook + committed baseline / GitHub Actions job) that fails only on **new**
|
|
474
|
-
non-conformities, not the existing backlog. See `references/automation.md`.
|
|
475
|
-
|
|
476
|
-
### Rendered regressions on every pull request (`audit --lite`)
|
|
477
|
-
|
|
478
|
-
The full page-by-page run captures every page and adjudicates with a model, which is minutes of
|
|
479
|
-
browser and tens of minutes of model: it belongs on a schedule. The static gate runs on every pull
|
|
480
|
-
request but cannot see the rendered page. `audit --lite` is the gate in between, priced for every
|
|
481
|
-
pull request:
|
|
482
|
-
|
|
483
|
-
- **only the pages the diff can change** — `ultra11y affected --since origin/main` diffs from the
|
|
484
|
-
merge-base and follows each sample page's `sources` through their imports (relative paths,
|
|
485
|
-
tsconfig aliases, `import()`, stylesheets and Sass `@use`/`@import`; type-only imports are
|
|
486
|
-
erased, so they select nothing). A Next.js App Router page is wrapped by every `layout`/`template`
|
|
487
|
-
above it. What no import says goes in `sample.global` — a touched global file selects every
|
|
488
|
-
page — and changed markup no page reaches is listed as `unmapped`, in a warning. No browser, no
|
|
489
|
-
parse: it reads only the files the pages reach, in well under a second;
|
|
490
|
-
- **the engine alone** — `ultra11y audit --lite --pages <ids>` audits those snapshots and nothing
|
|
491
|
-
else: no source audit, no adjudication, no per-page report, no PDF, no pixel tier, no HTML;
|
|
492
|
-
- **only NEW findings fail** — the baseline keys a rendered finding on
|
|
493
|
-
`page|rule|criterion|normalized selector` (generated ids, hashes and digits folded), not on its
|
|
494
|
-
position in the serialized DOM, which moves whenever anything above it changes. A finding that
|
|
495
|
-
only moved is not new; a third `img` without `alt` on a page that had two is. Where the baseline
|
|
496
|
-
is kept is the caller's choice: the push to the default branch audits every page and writes it
|
|
497
|
-
(`--write-baseline`), and a pull request compares against the one of its merge-base;
|
|
498
|
-
- **a new page is judged with no reference** — that push records every sample page, clean ones
|
|
499
|
-
included, so a page the merge-base's own baseline does not know was added by the pull request:
|
|
500
|
-
every finding on it at `fail-on` is new and fails, and the summary says the page is new. Only a
|
|
501
|
-
baseline that cannot speak for it only warns: none at all, one written by another ultra11y
|
|
502
|
-
version, or one that is not the merge-base's own (`--baseline-approximate`). A page
|
|
503
|
-
the push was asked for, or that the sample declares, but that left no snapshot is recorded as
|
|
504
|
-
`skipped` in the baseline and never judged new;
|
|
505
|
-
- **a route nobody declared is named** — `affected` lists the route files the diff adds or changes
|
|
506
|
-
(Next.js App Router `page.*`, a `pages/` router — Next, Nuxt, Astro —, SvelteKit
|
|
507
|
-
`+page.svelte`) that no sample page declares in its `sources`, as `unsampled`.
|
|
508
|
-
`--require-sampled` fails on them: declare
|
|
509
|
-
the page in `sample.pages`, or exempt it in `sample.exempt` with a reason. A router configured in
|
|
510
|
-
code (React Router, Vue Router) has no route files to recognise: declare those pages.
|
|
511
|
-
|
|
512
|
-
```jsonc
|
|
513
|
-
// .ultra11yrc.json
|
|
514
|
-
{
|
|
515
|
-
"sample": {
|
|
516
|
-
// What no import says: the root layout, global styles, and what changes the rendered output
|
|
517
|
-
// from outside the source tree — dependencies (lockfile, patches), relative to this file.
|
|
518
|
-
"global": ["src/app/layout.tsx", "src/styles/**", "package.json", "../../pnpm-lock.yaml", "../../patches/**"],
|
|
519
|
-
// Routes deliberately outside the sample — a reason is required.
|
|
520
|
-
"exempt": [{ "path": "src/app/(mfa)/**", "reason": "behind MFA, unreachable from the capture" }],
|
|
521
|
-
"pages": [{ "id": "accueil", "name": "Accueil", "url": "http://localhost:3000/", "sources": ["src/app/page.tsx"] }]
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
```
|
|
525
|
-
|
|
526
|
-
```ts
|
|
527
|
-
// e2e/a11y/sweep.a11y.ts — capture only what `affected` selected
|
|
528
|
-
const only = process.env.ULTRA11Y_PAGES?.split(",").filter(Boolean);
|
|
529
|
-
for (const route of ROUTES.filter((r) => !only?.length || only.includes(r.id))) {
|
|
530
|
-
test(route.id, async ({ page }) => {
|
|
531
|
-
await page.goto(route.path);
|
|
532
|
-
await checkA11y(page, { as: route.id, name: route.name, sources: route.sources, failOn: false });
|
|
533
|
-
});
|
|
534
|
-
}
|
|
535
|
-
```
|
|
536
|
-
|
|
537
|
-
The loop is `ultra11y affected --since origin/main --json`, your capture of those pages, then
|
|
538
|
-
`ultra11y audit --lite --pages <ids> --baseline <file> --fail-on blocking` (and
|
|
539
|
-
`--write-baseline <file>` on the default branch); `--format sarif|github` renders the new
|
|
540
|
-
findings for code scanning or as annotations.
|
|
541
|
-
|
|
542
|
-
### Optional model tier (`judge`) — for the runs with no agent in the loop
|
|
543
|
-
|
|
544
|
-
Inside a coding agent the judgment criteria are the agent's to rule on. Outside one — CI or an
|
|
545
|
-
E2E run — nobody does, so they stay « à évaluer ». `judge` adjudicates
|
|
546
|
-
them with a model, and is a **caller, not a second judge**: the worklist, the evidence and the
|
|
547
|
-
prompt are `verify --manual`'s own, and the verdicts pass through the **same fail-closed gate**
|
|
548
|
-
an agent's do. An unjustified `C`, an `NC` citing a line that does not resolve, a verdict for a
|
|
549
|
-
criterion nobody asked about, or an incomplete run are all refused — and a rejected
|
|
550
|
-
adjudication leaves the audit untouched. All-`manual` with reasons is accepted, because that is
|
|
551
|
-
a correct answer. Choose the transport explicitly:
|
|
552
|
-
|
|
553
|
-
```sh
|
|
554
|
-
# Anthropic Messages API
|
|
555
|
-
ANTHROPIC_API_KEY=… ultra11y judge --in audits/audit-latest.json --runner api --apply
|
|
556
|
-
|
|
557
|
-
# Local CLI subscriptions; each reuses that CLI's existing login
|
|
558
|
-
ultra11y judge --in audits/audit-latest.json --runner claude --apply
|
|
559
|
-
ultra11y judge --in audits/audit-latest.json --runner codex --apply
|
|
560
|
-
```
|
|
561
|
-
|
|
562
|
-
`--runner cli` remains an alias of `claude` for existing scripts. The Codex runner invokes
|
|
563
|
-
`codex exec` ephemerally, read-only, offline, without repository rules, hooks or user config;
|
|
564
|
-
it uses the model attached to the ChatGPT account unless `--model` is given. Its subscription
|
|
565
|
-
has no per-run dollar-budget flag, so `--max-budget-usd` is rejected for Codex rather than
|
|
566
|
-
pretending to enforce a ceiling. Use `--timeout` and `--max` to bound the local run.
|
|
567
|
-
|
|
568
|
-
In CI, the judgment criteria are adjudicated by iterion's
|
|
569
|
-
[`rgaa-audit` bot](https://github.com/SocialGouv/iterion/tree/main/bots/rgaa-audit), with
|
|
570
|
-
read-only agents and a second reader, through the same fail-closed fold.
|
|
571
|
-
ChatGPT-subscription authentication stays local: public CI does not receive or manufacture a
|
|
572
|
-
Codex subscription secret.
|
|
325
|
+
re-stages them, and blocks only on judgment issues. See `references/automation.md`.
|
|
573
326
|
|
|
574
327
|
### Optional dynamic tier (axe-core)
|
|
575
328
|
|
|
576
|
-
`scan` runs **axe-core in a headless browser** to decide the *needs-rendering* criteria the static engine leaves as residual risks — chiefly **computed colour contrast (1.4.3)** plus a 320px **reflow** check (1.4.10) and a render cross-check of the structural rules.
|
|
329
|
+
`scan` runs **axe-core in a headless browser** to decide the *needs-rendering* criteria the static engine leaves as residual risks — chiefly **computed colour contrast (1.4.3)** plus a 320px **reflow** check (1.4.10) and a render cross-check of the structural rules. It uses a Playwright that resolves from your project (`--cwd`), then from ultra11y's own dependencies, and additionally probes focus visibility (2.4.7), 200% zoom (1.4.4), text spacing (1.4.12) and content-on-hover (1.4.13), plus **stateful** probes (fill inputs then re-measure overflow, and a live-region probe for status messages 4.1.3 — opt out with `--no-interact`, `--interact-clicks` for authed-scan button clicks), and takes `--storage-state` for authenticated pages. `--merge` folds the findings into a static `AuditResult`, upgrading `manual` criteria to `C`/`NC`. A country-standard audit scans its declared page sample with `scan --sample` (lint it first with `sample check`):
|
|
577
330
|
|
|
578
331
|
```sh
|
|
579
332
|
node scripts/ultra11y.mjs audit "src/**/*.html" --out audits --json > /dev/null
|
|
580
|
-
node scripts/ultra11y.mjs scan http://localhost:3000 --
|
|
333
|
+
node scripts/ultra11y.mjs scan http://localhost:3000 --cwd . --merge audits/audit-latest.json --out audits
|
|
581
334
|
node scripts/ultra11y.mjs report --in audits/audit-latest.json --out audits
|
|
582
335
|
```
|
|
583
336
|
|
|
584
|
-
|
|
337
|
+
The scan needs a Chromium binary (`npx playwright install chromium`, or one already on the machine named with `--browser-path /usr/bin/chromium` / `ULTRA11Y_BROWSER_PATH` — launched as given, never replaced by a fallback) plus `@playwright/test` and `@axe-core/playwright` — which **come with the npm package**, since they are its own dependencies; the audited project's own copies take precedence when it has them. Running the engine as a **standalone skill bundle** is the exception: an installed skill has no `node_modules` beside it, so there the two packages must be in the audited project, reachable from `--cwd`. The engine bundle itself stays dependency-free either way. See `skills/ultra11y/references/dynamic.md`.
|
|
585
338
|
|
|
586
339
|
Typical audit flow:
|
|
587
340
|
|
|
@@ -625,25 +378,6 @@ only the second is a gap.
|
|
|
625
378
|
|
|
626
379
|
The skill (`skills/ultra11y/SKILL.md` + `references/`) teaches the agent when and how to run these, how to complete the manual criteria, and the native-first authoring doctrine.
|
|
627
380
|
|
|
628
|
-
## Démo RGAA : le refuge
|
|
629
|
-
|
|
630
|
-
Le dépôt contient un [site de démonstration local](demos/refuge-rgaa/README.txt)
|
|
631
|
-
avec **59 scénarios volontairement non conformes et 59 témoins séparés**.
|
|
632
|
-
Il prolonge la démo Microsoft Edge, conservée avec sa licence et sa provenance
|
|
633
|
-
dans [`demos/microsoft-edge-a11y`](demos/microsoft-edge-a11y).
|
|
634
|
-
|
|
635
|
-
```sh
|
|
636
|
-
pnpm run demo:refuge # Python 3 ; http://127.0.0.1:8765/
|
|
637
|
-
pnpm run demo:refuge:check # ressources, liens, critères et séparation des témoins
|
|
638
|
-
```
|
|
639
|
-
|
|
640
|
-
Les pages et les médias sont fournis : aucune génération ni dépendance Python
|
|
641
|
-
supplémentaire n’est nécessaire pour visiter le site. Le
|
|
642
|
-
[guide de la démo](demos/refuge-rgaa/README.txt) décrit la reconstruction,
|
|
643
|
-
les tests navigateur et les commandes d’audit. Le catalogue et les verdicts
|
|
644
|
-
attendus restent hors du site audité ; ils ne constituent pas des détections
|
|
645
|
-
mesurées de l’outil. Cette démo ne prétend pas couvrir les 106 critères du RGAA.
|
|
646
|
-
|
|
647
381
|
## Development
|
|
648
382
|
|
|
649
383
|
```sh
|
|
@@ -655,6 +389,7 @@ pnpm run check:build # asserts every committed artefact is reproducible from
|
|
|
655
389
|
pnpm run build:wcag # re-derive src/data/wcag.json from the vendored W3C source
|
|
656
390
|
pnpm run build:pack:rgaa # re-build the RGAA pack from the vendored DINUM source
|
|
657
391
|
pnpm run build:criteria # regenerate skills/ultra11y/references/criteria.md
|
|
392
|
+
pnpm run demo # audit → report → check → criteria on tests/fixtures
|
|
658
393
|
```
|
|
659
394
|
|
|
660
395
|
Releases are cut automatically by **semantic-release** on push to `main` (GitHub release +
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ultra11y",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.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",
|
|
@@ -34,7 +34,6 @@
|
|
|
34
34
|
"src",
|
|
35
35
|
"dist",
|
|
36
36
|
"skills",
|
|
37
|
-
"docker",
|
|
38
37
|
".claude-plugin",
|
|
39
38
|
".codex-plugin",
|
|
40
39
|
".agents",
|
|
@@ -73,10 +72,6 @@
|
|
|
73
72
|
"build:site": "node scripts/build-site.mjs",
|
|
74
73
|
"check:site": "node scripts/build-site.mjs --check",
|
|
75
74
|
"demo": "node scripts/ultra11y.mjs audit tests/fixtures/non-conforming/bad.html --out /tmp/ultra11y-demo --json > /dev/null && node scripts/ultra11y.mjs report --in /tmp/ultra11y-demo/audit-latest.json --out /tmp/ultra11y-demo && node scripts/ultra11y.mjs check --report /tmp/ultra11y-demo/wcag-*.md && node scripts/ultra11y.mjs criteria --list",
|
|
76
|
-
"demo:refuge": "python3 demos/refuge-rgaa/serve.py",
|
|
77
|
-
"demo:refuge:build": "python3 demos/refuge-rgaa/build.py",
|
|
78
|
-
"demo:refuge:check": "python3 demos/refuge-rgaa/verify-files.py",
|
|
79
|
-
"demo:refuge:test": "node demos/refuge-rgaa/verify-browser.mjs",
|
|
80
75
|
"release": "semantic-release"
|
|
81
76
|
},
|
|
82
77
|
"license": "MIT",
|