preview.
axe-core integration
The helpertests/support/helpers/a11y.ts wraps @axe-core/playwright with WCAG 2.1 AA tag filtering and structured violation output:
Using expectAccessible in tests
Every new page or block must include an accessibility assertion. Import the helper from the support directory:tests/e2e/smoke.spec.ts) runs this assertion on every test run across all 5 browser projects, giving broad coverage of the homepage on each platform.
Disabling specific rules
Occasionally a third-party component or a known design constraint causes a rule violation that cannot be fixed immediately. PassdisableRules to suppress specific axe rules:
Lighthouse CI score target
Lighthouse CI enforces a minimum accessibility score of 90 on every PR topreview. This runs as a separate CI step after E2E tests complete.
Lighthouse accessibility covers audits that axe-core does not — image alt text at the Lighthouse layer, link text quality, heading order, and color contrast ratios.
Common accessibility patterns
Semantic HTML
All block components use semantic landmark elements. The page structure uses<header>, <main>, <footer>, and section landmarks:
ARIA attributes
Interactive components include the necessary ARIA attributes. The FAQ Section block usesaria-expanded and aria-controls for accordion state:
Keyboard navigation
The FAQ Section is fully keyboard-navigable. Keyboard behavior is tested in the E2E suite:Focus management
- All interactive elements are reachable by keyboard in logical tab order.
- Visible focus indicators are present — Tailwind’s
focus-visible:ringutility is used throughout. - No
tabindexvalues greater than 0.
Images
- Decorative images use
alt=""to hide them from screen readers. - Informative images have descriptive
alttext. - Sanity image assets include an
altfield in the schema.
Adding accessibility tests for a new block
1
Create the E2E spec
Add a spec file in
tests/e2e/ for the page that renders the block (or add to an existing spec).2
Navigate to the page
3
Call expectAccessible
4
Fix violations before merging
axe-core violations fail the test with the rule ID and affected element selectors. Fix each violation in the component before opening a PR.