Skip to content

feat(a11y): wire axe serious/critical gate (criterion stays not-assessed — contrast finding)#76

Draft
bdelanghe wants to merge 1 commit into
mainfrom
feat/axe-gate
Draft

feat(a11y): wire axe serious/critical gate (criterion stays not-assessed — contrast finding)#76
bdelanghe wants to merge 1 commit into
mainfrom
feat/axe-gate

Conversation

@bdelanghe

Copy link
Copy Markdown
Contributor

Wires an automated axe-core accessibility gate into the contract family so a11y.axe-serious-critical becomes continuously ENFORCED. Honest outcome: the criterion stays not-assessed because a real axe run is not clean yet (details below) — it is NOT marked met.

Changes

  • Vendor gates/axe-gate.mjs into vendor/conformance-kit/ (hash-pinned in conformance-kit.lock.json; verify-vendor green at 44 files). Byte-identical to conformance-kit PR blog: minimal writing surface (publishes post #1) #6.
  • .github/workflows/axe.yml — builds dist, runs the gate via Playwright/Chromium over every built page, fails closed on any serious/critical violation.
  • package.jsonaxe-core + @axe-core/playwright + playwright (devDeps) + an npm run axe script.
  • data/conformance-evidence.json is unchanged — axe is deliberately left not-assessed (no axe evidence asserted). Conformance stays 11/27 met.

Why not-assessed: a real serious finding (this gate will be RED until fixed)

axe-core (WCAG 2.x A/AA) over the built dist found a serious color-contrast (WCAG 1.4.3) violation on index.html — 4 distinct fg/bg pairs, 22 nodes:

selector fg bg ratio needs
.hero__lock > .eyebrow--light #7fb8a2 #0c5a42 3.62:1 4.5:1
.start-here__alt #bac6bf #ffffff 1.76:1 4.5:1
.seams__lead #7d8982 #ffffff 3.63:1 4.5:1
code-comment tokens .c #6f9f8c #073d2c 4.09:1 4.5:1

All other 8 pages (404, conformance, blog index + 5 posts) are clean. These are genuine contrast failures (muted "light"/"alt" text + dark-block syntax-comment tokens), not harness artifacts — the gate serves the full dist so brand CSS resolves. Fixing them is a brand-token decision, out of scope for this PR, so the criterion honestly stays not-assessed. Once the four colors are bumped to ≥ 4.5:1, this gate goes green and axe: { serious: 0, critical: 0 } can be asserted.

Companion PRs: conformance-kit #6 (the gate) and bdelanghe/site #153 (same wiring; that site is axe-clean, so it asserts the criterion met).

🤖 Generated with Claude Code

…sed)

Vendors the conformance-kit axe-gate (hash-pinned in conformance-kit.lock.json;
byte-identical to conformance-kit PR #6) and adds .github/workflows/axe.yml to
run axe-core (WCAG 2.x A/AA) over every built page via Playwright/Chromium,
failing closed on any serious/critical violation.

HONEST: a real axe run over the built dist is NOT clean — index.html has a
serious color-contrast (WCAG 1.4.3) violation (4 distinct foreground/background
pairs, 22 nodes):
  - .hero__lock > .eyebrow--light   #7fb8a2 on #0c5a42 → 3.62:1 (need 4.5)
  - .start-here__alt                #bac6bf on #ffffff → 1.76:1 (need 4.5)
  - .seams__lead                    #7d8982 on #ffffff → 3.63:1 (need 4.5)
  - code-comment tokens (.c)        #6f9f8c on #073d2c → 4.09:1 (need 4.5)
So `a11y.axe-serious-critical` is deliberately LEFT not-assessed in
data/conformance-evidence.json (not marked met) — no overclaim. The gate is
wired and will turn green (and the criterion can then be asserted) once these
contrasts are fixed in the brand tokens.

package.json: axe-core + @axe-core/playwright + playwright (devDeps) + npm run axe.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011uU1XvPggEPNMiXBUrV8hy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant