Skip to content

fix(a11y): landing and contact pages score 1.0 — real radiogroup/tablist semantics, and a consent banner that is not a stray h6 - #792

Merged
thinkclay merged 2 commits into
mainfrom
fix/774-a11y
Sep 17, 2026

Conversation

@thinkclay

@thinkclay thinkclay commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

What

Closes the last acceptance box on #774: accessibility ≥ 0.95 on / and /contact. Both now measure 1.0 (Lighthouse 12.8, mobile preset, production export), as do /jobs and /terms.

Lighthouse named three defects, all of them the same class as #638 — a role reaching the DOM without its state or its parent, because react-native-web has no mapping for accessibilityState:

audit weight where fix
aria-required-attr 10 the six "Organization type" pills in ContactSection — role="radio" with no aria-checked aria-checked alongside accessibilityState={{ checked }}, inside a role="radiogroup"
aria-required-parent 10 the "For Organizations / For Workers" toggle in Benefits — role="tab" with no tablist role="tablist" on the row, aria-selected on each tab
heading-order 3 the cookie banner's <h6> after the page's <h1>/<h2> the banner's title is bold text inside a labelled region, not a heading — Scaffald/ui#30, pointer bumped here

Scaffald/ui#30 also makes a dismissed banner leave the accessibility tree: it hid with opacity: 0, which kept three focusable buttons in the tab order on every page after consent (the leftover noted when #452 was closed). Hidden is now display: none + aria-hidden, still rendered unconditionally so hydration parity holds.

.lighthouserc.json's accessibility budget goes back up to 0.95 (the ratchet from #782: lower a number when a PR beats it; this one is a floor, so it rises).

Verification

  • Before, same rig: / 0.87, /contact 0.92. After: / 1.0, /contact 1.0, /jobs 1.0, /terms 1.0. The only remaining note on /jobs is a weight-0 label-content-name-mismatch on the card buttons (aria-label="View Pipe Welder…" vs the visible title) — not a scoring audit, left alone.
  • fix(CookieConsent): a dismissed banner leaves the accessibility tree, and its title is not a heading ui#30: 3 new tests through react-dom — hidden until the storage read resolves then shown; stays hidden when consent exists; no heading role, region present.
  • scf-core typecheck green, biome clean, pnpm prepush green.

Also: one flaky test made deterministic

scf-core:test failed on this PR's first two CI runs — same test both times, GeneralInfoStep keeps continue disabled until required fields are complete, which this PR does not touch and which passes locally 5 of 5 with the same ui dist. It read onStepStateChange.mock.calls[last] right after waitFor(button enabled), but the snapshot comes from a passive effect after that commit, so on a loaded runner the last call was not yet the valid one. It now waits for the call (toHaveBeenLastCalledWith). Recorded on #753.
🤖 Generated with Claude Code

…tablist semantics, and a consent banner that is not a stray h6

Closes the last box on #774.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
… failed twice in a row on CI

The snapshot is reported from a passive effect after the commit that enables
the button, so the last mock call is not guaranteed to be the valid one when
the button first reads enabled. #753 in miniature.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@thinkclay
thinkclay merged commit 32f55e0 into main Sep 17, 2026
9 checks passed
@thinkclay
thinkclay deleted the fix/774-a11y branch September 17, 2026 08:28
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