ultra11y 2.24.0 → 2.26.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.
@@ -1,9 +1,10 @@
1
1
  ---
2
2
  name: ultra11y
3
3
  description: "Use to AUDIT existing HTML/CSS/JSX against WCAG 2.2 AA accessibility and produce a dated auditor-conformance report, OR to AUTHOR/REVIEW accessible markup (native-HTML-first, ARIA last). An install-free engine (`node scripts/ultra11y.mjs`, no keys) runs 78 static checks tied to WCAG criteria — alt/lang/title, unlabeled fields, empty links/buttons, tables, headings, ARIA vocabulary, label-in-name, autocomplete — measured against the official W3C ACT corpus. The engine decides 3 of the 55 criteria; the AI agent adjudicates the 38 judgment ones from harvested evidence + a per-criterion decision protocol (`verify --manual`, gated, fannable via `orchestrate`), and the 14 rendering ones go to `scan` — never silently conforming. Library/SFC code is audited as RENDERED captures (`render --setup`); country standards are pluggable packs (`--standard rgaa`, `scan --sample`). check/verify reject invented non-conformities. Triggers: 'audit WCAG/a11y', 'make accessible', 'fix a11y', 'audit RGAA'."
4
+ when_to_use: "Invoke when the user asks for an accessibility AUDIT or a formal deliverable: audit a repo, site or page against WCAG 2.2 AA or a country standard (RGAA, Section 508, EN 301 549); produce a dated conformance report, a criterion grid, a PRD remediation backlog or GitHub issues; author accessible markup from scratch; wire the repo gate (init --hook/--ci) or a rendered-DOM capture pipeline. For a review of the code UNDER CHANGE (diff, branch, PR), use the `review-a11y` skill instead."
4
5
  license: MIT
5
6
  metadata:
6
- version: 2.24.0
7
+ version: 2.26.0
7
8
  ---
8
9
 
9
10
  # ultra11y — audit WCAG 2.2 AA and write accessible markup
@@ -154,7 +155,9 @@ Domain knowledge first, then the tooling. Read the one that matches the question
154
155
  - **"Automatic repo gate (hook / CI)"** → `init --hook` writes a git pre-commit gate over
155
156
  the **strict staged snapshot** (audits the exact index blobs, auto-applies safe fixes and
156
157
  re-stages them, blocks only on judgment issues); `init --baseline`/`--ci` is the opt-in
157
- "block only NEW non-conformities" variant. For library/SFC code, commit rendered
158
+ "block only NEW non-conformities" variant. Installed as a **Claude Code plugin**, a third
159
+ gate runs the `review-a11y` *skill* (not just the engine) on a pending commit/push/PR —
160
+ that one is shipped by the plugin, not by `init`. For library/SFC code, commit rendered
158
161
  **captures** (`render --setup`) and stage them so the real semantic HTML is what's
159
162
  checked (`audit --require-captures`); read **`references/automation.md`**.
160
163
  - **"Show me the problems while I build the page"** → `dev --next` writes a one-line overlay
@@ -10,6 +10,43 @@ node scripts/ultra11y.mjs init --ci # .github/workflows/a11y.yml (PR
10
10
  node scripts/ultra11y.mjs init --baseline … # opt into the legacy regression gate (below)
11
11
  ```
12
12
 
13
+ ## Three gates, three different jobs
14
+
15
+ | | what runs | when | who decides |
16
+ |---|---|---|---|
17
+ | `init --hook` | the engine, mechanically | every `git commit` | the engine's `--fail-on` |
18
+ | `init --ci` | the engine, in CI | every pull request | the engine's `--fail-on` |
19
+ | the **Claude Code plugin hook** | the `review-a11y` **skill** | a pending commit / push / PR, inside an agent session | the AI agent, adjudicating |
20
+
21
+ The first two block on what a machine can decide. The third exists because most of WCAG is
22
+ *judgment* — is this `alt` relevant, is this link's purpose clear — which no exit code
23
+ settles. See below.
24
+
25
+ ## The Claude Code plugin hook — the agent review, unprompted
26
+
27
+ Shipped by the plugin (`hooks/hooks.json` → `hooks/pre-tool-use.mjs` → `ultra11y hook
28
+ --claude-code`), not by `init`. Claude Code has no git event, so it listens on `PreToolUse`
29
+ for the Bash tool and recognises the commands that **publish** work — `git commit` (scoped
30
+ to `--staged`), `git push` and `gh pr create` (scoped to `--since <default branch>`). When
31
+ the change carries findings at or above the threshold it returns `permissionDecision:
32
+ "deny"` with the findings attached, and the agent invokes `review-a11y` to adjudicate them.
33
+
34
+ Two invariants make it liveable:
35
+
36
+ - **It never fires twice for the same findings.** The finding set is fingerprinted per
37
+ session, so the retry after a review always goes through — a review that refutes
38
+ everything still lets the commit land.
39
+ - **It never breaks a git flow.** Git's own `no-verify` bypass, a dry run, a cwd outside a
40
+ repository, an unresolvable base ref, an engine error or a timeout all resolve to silence,
41
+ never to an error the user has to work around.
42
+
43
+ Threshold and off-switches: `ULTRA11Y_HOOK_FAIL_ON=blocking|major|minor|off` (env, wins),
44
+ then `"hook": { "failOn": … }` in `.ultra11yrc.json`, else `blocking`. `SKIP_A11Y=1` (the
45
+ same bypass as the pre-commit hook) and `ULTRA11Y_HOOK=off` disable it outright.
46
+
47
+ A hook **cannot force** a skill invocation — it blocks and hands over the reason, the agent
48
+ invokes. And a plugin's hooks are enabled by enabling the plugin, not by the install alone.
49
+
13
50
  ## Default: strict staged snapshot + safe auto-fix
14
51
 
15
52
  The default pre-commit hook operates on **exactly what is about to be committed** — the