ultra11y 5.57.4 → 5.58.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.
@@ -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.4",
13
+ "version": "5.58.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.57.4",
4
+ "version": "5.58.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.57.4",
4
+ "version": "5.58.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 = "5.57.4";
47
+ const ULTRA11Y_PLUGIN_VERSION = "5.58.0";
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,97 @@ 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. A page the
511
+ baseline never measured, or a baseline written by another ultra11y version, warns instead of
512
+ failing. The baseline lives in the Actions cache: the push to the default branch audits every
513
+ page and saves it under a key carrying the SHA, and a pull request restores the one of its
514
+ merge-base (else the closest by prefix).
515
+
516
+ ```jsonc
517
+ // .ultra11yrc.json
518
+ {
519
+ "sample": {
520
+ // What no import says: the root layout, global styles, and what changes the rendered output
521
+ // from outside the source tree — dependencies (lockfile, patches), relative to this file.
522
+ "global": ["src/app/layout.tsx", "src/styles/**", "package.json", "../../pnpm-lock.yaml", "../../patches/**"],
523
+ "pages": [{ "id": "accueil", "name": "Accueil", "url": "http://localhost:3000/", "sources": ["src/app/page.tsx"] }]
524
+ }
525
+ }
526
+ ```
527
+
528
+ ```yaml
529
+ name: Accessibility (rendered, per PR)
530
+ on:
531
+ pull_request:
532
+ push:
533
+ branches: [main] # writes the baseline the pull requests compare against
534
+ permissions:
535
+ contents: read
536
+ security-events: write # SARIF → code scanning (optional: annotations cover it without)
537
+ jobs:
538
+ a11y-lite:
539
+ runs-on: ubuntu-latest
540
+ steps:
541
+ - uses: actions/checkout@v5
542
+ with:
543
+ fetch-depth: 0 # the merge-base
544
+ - id: affected
545
+ uses: SocialGouv/ultra11y@v5
546
+ with:
547
+ mode: lite
548
+ step: affected
549
+ # Your own capture, of those pages only. Here a Playwright suite whose tests call
550
+ # `checkA11y` and filter their routes on ULTRA11Y_PAGES (empty = every page).
551
+ - if: steps.affected.outputs.affected-none != 'true'
552
+ run: npx playwright test e2e/a11y
553
+ env:
554
+ ULTRA11Y_PAGES: ${{ steps.affected.outputs.affected-pages }}
555
+ - if: steps.affected.outputs.affected-none != 'true'
556
+ uses: SocialGouv/ultra11y@v5
557
+ with:
558
+ mode: lite
559
+ step: audit
560
+ pages: ${{ steps.affected.outputs.affected-pages }}
561
+ standard: rgaa
562
+ fail-on: blocking
563
+ ```
564
+
565
+ ```ts
566
+ // e2e/a11y/sweep.a11y.ts — capture only what `affected` selected
567
+ const only = process.env.ULTRA11Y_PAGES?.split(",").filter(Boolean);
568
+ for (const route of ROUTES.filter((r) => !only?.length || only.includes(r.id))) {
569
+ test(route.id, async ({ page }) => {
570
+ await page.goto(route.path);
571
+ await checkA11y(page, { as: route.id, name: route.name, sources: route.sources, failOn: false });
572
+ });
573
+ }
574
+ ```
575
+
576
+ The job summary lists each new finding (page, criterion, rule, element); annotations and a SARIF
577
+ upload (category `ultra11y-lite-<standard>`) carry them too. No sticky comment. The same gate
578
+ outside GitHub: `ultra11y affected --since origin/main --json`, your capture, then
579
+ `ultra11y audit --lite --pages <ids> --baseline <file> --fail-on blocking` (and
580
+ `--write-baseline <file>` on the default branch).
581
+
488
582
  ### Optional model tier (`judge`) — for the runs with no agent in the loop
489
583
 
490
584
  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.4",
3
+ "version": "5.58.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",