devops(testing): add axe-core accessibility checks to Playwright E2E suite #118
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Accessibility regressions are currently invisible in CI. A change that removes an
aria-labelor breaks keyboard focus order will pass all tests and be merged silently.Fix
Add
@axe-core/playwrightto the E2E suite and run automated accessibility checks on key pages:Install:
Add a dedicated a11y spec (
e2e/accessibility.spec.ts):Notes
wcag2a+wcag2aatags — covers the most impactful rulesAcceptance Criteria
@axe-core/playwrightinstalled as dev dependencye2e/accessibility.spec.tsruns against at least 5 key pagesArchitect review (@mkeller): ✅ Approach is correct —
@axe-core/playwrightis the official Deque integration, the right package choice.One implementation prerequisite: the spec uses
waitForSelector('[data-hydrated]')before running axe. That sentinel attribute needs to actually exist in the layout (e.g. set on<body>or the root element afteronMount). Verify this is in place before writing the spec, otherwise the wait will time out or resolve too early.Close #122 — it covers the same goal but uses
axe-playwright, a community wrapper that@axe-core/playwrightsupersedes. This ticket is the one to implement.