ultra11y 5.57.5 → 5.58.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,7 +10,7 @@
10
10
  "name": "ultra11y",
11
11
  "source": "./",
12
12
  "description": "RGAA 4.1.2 accessibility audits on a WCAG 2.2 AA core: automatic review before commit, push and pull request, plus dated, evidenced Markdown, HTML and per-page conformance reports in Claude Code.",
13
- "version": "5.57.5",
13
+ "version": "5.58.1",
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.57.5",
4
+ "version": "5.58.1",
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.57.5",
4
+ "version": "5.58.1",
5
5
  "author": { "name": "maxgfr", "url": "https://github.com/maxgfr" },
6
6
  "homepage": "https://github.com/SocialGouv/ultra11y",
7
7
  "repository": "https://github.com/SocialGouv/ultra11y",
@@ -44,7 +44,7 @@ import { fileURLToPath } from "node:url";
44
44
  // does not carry it, so a user's own ultra11y.js is never clobbered. Kept as text, not as
45
45
  // an export (see above).
46
46
  const ULTRA11Y_OPENCODE_PLUGIN = "ULTRA11Y_OPENCODE_PLUGIN";
47
- const ULTRA11Y_PLUGIN_VERSION = "5.57.5";
47
+ const ULTRA11Y_PLUGIN_VERSION = "5.58.1";
48
48
  const PLUGIN_ID = "ultra11y";
49
49
  const SKILL_NAMES = ["ultra11y", "review-a11y"];
50
50
 
package/README.md CHANGED
@@ -145,6 +145,8 @@ ultra11y audit <globs… | -> [--standard <pack>] [--out <dir>] [--include <
145
145
  ultra11y audit [--changed | --since <ref> | --staged] [--max-files <n>] [--dedup exact|normalized|off] [--baseline <file>] [--fail-on blocking|major|minor]
146
146
  ultra11y audit [--captures <dir>] [--no-captures] [--require-captures] # audit rendered-DOM captures alongside source
147
147
  ultra11y audit [--format sarif|github] # CI: code-scanning SARIF, or inline annotations + job summary
148
+ ultra11y audit --lite [--pages <ids>] [--baseline <file>] [--write-baseline <file>] [--fail-on …] # rendered regression gate: snapshots only, new findings only
149
+ ultra11y affected --since <ref> | --all [--root <dir>] [--json] # the sample pages a diff can change
148
150
  ultra11y report --in <audit.json> [--out <dir>] [--standard <pack>] [--format sarif|github] [--lang auto|en|fr]
149
151
  ultra11y prd --in <audit.json> [--out <dir>] [--split criterion] [--format audit|doc|remediation] [--standard <pack>] [--lang auto|en|fr]
150
152
  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]
@@ -464,7 +466,8 @@ or malformed file is reported unreadable. See `skills/ultra11y/references/audit.
464
466
  end. `adjudicate: api|agent` optionally
465
467
  rules on the judgment criteria that would otherwise stay « à évaluer » in CI, reading its key
466
468
  from the job environment and skipping itself without one. `ultra11y init --ci` writes a
467
- workflow using it. See `references/ci.md`.
469
+ workflow using it. `mode: lite` is the per-pull-request **rendered** gate: only the pages the
470
+ diff reaches, the engine alone, failing only on new findings (see below). See `references/ci.md`.
468
471
  - **Two PR comments, not one** — `comment-kind: digest` (the default) posts the distinct
469
472
  defects a reviewer can act on; `comment-kind: pages` posts the **page-by-page grid**: one row
470
473
  per page with its basis, its rate *and its denominator*, then the non-conforming criteria of
@@ -485,6 +488,112 @@ or malformed file is reported unreadable. See `skills/ultra11y/references/audit.
485
488
  regression variant (hook + committed baseline / GitHub Actions job) that fails only on **new**
486
489
  non-conformities, not the existing backlog. See `references/automation.md`.
487
490
 
491
+ ### Rendered regressions on every pull request (`mode: lite`)
492
+
493
+ The full page-by-page run captures every page and adjudicates with a model, which is minutes of
494
+ browser and tens of minutes of model: it belongs on a schedule. The static gate runs on every pull
495
+ request but cannot see the rendered page. `mode: lite` is the gate in between, priced for every
496
+ pull request:
497
+
498
+ - **only the pages the diff can change** — `ultra11y affected --since origin/main` diffs from the
499
+ merge-base and follows each sample page's `sources` through their imports (relative paths,
500
+ tsconfig aliases, `import()`, stylesheets and Sass `@use`/`@import`; type-only imports are
501
+ erased, so they select nothing). A Next.js App Router page is wrapped by every `layout`/`template`
502
+ above it. What no import says goes in `sample.global` — a touched global file selects every
503
+ page — and changed markup no page reaches is listed as `unmapped`, in a warning. No browser, no
504
+ parse: it reads only the files the pages reach, in well under a second;
505
+ - **the engine alone** — `ultra11y audit --lite --pages <ids>` audits those snapshots and nothing
506
+ else: no source audit, no adjudication, no per-page report, no PDF, no pixel tier, no HTML;
507
+ - **only NEW findings fail** — the baseline keys a rendered finding on
508
+ `page|rule|criterion|normalized selector` (generated ids, hashes and digits folded), not on its
509
+ position in the serialized DOM, which moves whenever anything above it changes. A finding that
510
+ only moved is not new; a third `img` without `alt` on a page that had two is. The baseline lives
511
+ in the Actions cache: the push to the default branch audits every page and saves it under a key
512
+ carrying the SHA, and a pull request restores the one of its merge-base (else the closest by
513
+ prefix);
514
+ - **a new page is judged with no reference** — that push records every sample page, clean ones
515
+ included, so a page the merge-base's own baseline does not know was added by the pull request:
516
+ every finding on it at `fail-on` is new and fails, and the summary says the page is new. Only a
517
+ baseline that cannot speak for it only warns: none at all, one written by another ultra11y
518
+ version, or the closest entry by prefix (`--baseline-approximate`, set by the action). A page
519
+ the push was asked for, or that the sample declares, but that left no snapshot is recorded as
520
+ `skipped` in the baseline and never judged new;
521
+ - **a route nobody declared is named** — `affected` lists the route files the diff adds or changes
522
+ (Next.js App Router `page.*`, a `pages/` router — Next, Nuxt, Astro —, SvelteKit
523
+ `+page.svelte`) that no sample page declares in its `sources`, as `unsampled` and the action
524
+ output `affected-unsampled`. `--require-sampled` / `require-sampled: true` fails on them: declare
525
+ the page in `sample.pages`, or exempt it in `sample.exempt` with a reason. A router configured in
526
+ code (React Router, Vue Router) has no route files to recognise: declare those pages.
527
+
528
+ ```jsonc
529
+ // .ultra11yrc.json
530
+ {
531
+ "sample": {
532
+ // What no import says: the root layout, global styles, and what changes the rendered output
533
+ // from outside the source tree — dependencies (lockfile, patches), relative to this file.
534
+ "global": ["src/app/layout.tsx", "src/styles/**", "package.json", "../../pnpm-lock.yaml", "../../patches/**"],
535
+ // Routes deliberately outside the sample — a reason is required.
536
+ "exempt": [{ "path": "src/app/(mfa)/**", "reason": "behind MFA, unreachable from the capture" }],
537
+ "pages": [{ "id": "accueil", "name": "Accueil", "url": "http://localhost:3000/", "sources": ["src/app/page.tsx"] }]
538
+ }
539
+ }
540
+ ```
541
+
542
+ ```yaml
543
+ name: Accessibility (rendered, per PR)
544
+ on:
545
+ pull_request:
546
+ push:
547
+ branches: [main] # writes the baseline the pull requests compare against
548
+ permissions:
549
+ contents: read
550
+ security-events: write # SARIF → code scanning (optional: annotations cover it without)
551
+ jobs:
552
+ a11y-lite:
553
+ runs-on: ubuntu-latest
554
+ steps:
555
+ - uses: actions/checkout@v5
556
+ with:
557
+ fetch-depth: 0 # the merge-base
558
+ - id: affected
559
+ uses: SocialGouv/ultra11y@v5
560
+ with:
561
+ mode: lite
562
+ step: affected
563
+ require-sampled: true # a new route no sample page declares fails here
564
+ # Your own capture, of those pages only. Here a Playwright suite whose tests call
565
+ # `checkA11y` and filter their routes on ULTRA11Y_PAGES (empty = every page).
566
+ - if: steps.affected.outputs.affected-none != 'true'
567
+ run: npx playwright test e2e/a11y
568
+ env:
569
+ ULTRA11Y_PAGES: ${{ steps.affected.outputs.affected-pages }}
570
+ - if: steps.affected.outputs.affected-none != 'true'
571
+ uses: SocialGouv/ultra11y@v5
572
+ with:
573
+ mode: lite
574
+ step: audit
575
+ pages: ${{ steps.affected.outputs.affected-pages }}
576
+ standard: rgaa
577
+ fail-on: blocking
578
+ ```
579
+
580
+ ```ts
581
+ // e2e/a11y/sweep.a11y.ts — capture only what `affected` selected
582
+ const only = process.env.ULTRA11Y_PAGES?.split(",").filter(Boolean);
583
+ for (const route of ROUTES.filter((r) => !only?.length || only.includes(r.id))) {
584
+ test(route.id, async ({ page }) => {
585
+ await page.goto(route.path);
586
+ await checkA11y(page, { as: route.id, name: route.name, sources: route.sources, failOn: false });
587
+ });
588
+ }
589
+ ```
590
+
591
+ The job summary lists each new finding (page, criterion, rule, element); annotations and a SARIF
592
+ upload (category `ultra11y-lite-<standard>`) carry them too. No sticky comment. The same gate
593
+ outside GitHub: `ultra11y affected --since origin/main --json`, your capture, then
594
+ `ultra11y audit --lite --pages <ids> --baseline <file> --fail-on blocking` (and
595
+ `--write-baseline <file>` on the default branch).
596
+
488
597
  ### Optional model tier (`judge`) — for the runs with no agent in the loop
489
598
 
490
599
  Inside a coding agent the judgment criteria are the agent's to rule on. Outside one — CI, a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultra11y",
3
- "version": "5.57.5",
3
+ "version": "5.58.1",
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",