ci: check the main screens for accessibility regressions on every push

A Playwright job on the perf guard's production build runs axe-core's
WCAG 2.2 A/AA rules on the mail list, reading pane, composer, calendar,
contacts and Settings > Accessibility, and fails when a screen has more
serious or critical violations than scripts/a11y-guard/budget.json
allows (all zero today). Two more checks cover what axe can't see: the
keyboard focus outline stays visible in Windows contrast themes, and
single-key shortcuts don't act on the mail behind an open dialog.

axe-core is vendored next to the spec (MPL-2.0, see NOTICE), so the
check adds no dependency. `A11Y_GUARD_UPDATE=1 npm run test:a11y-guard`
rewrites the budget.
This commit is contained in:
Linus Rath
2026-10-29 20:02:10 +01:00
parent 2e13accade
commit 47bfd754f7
7 changed files with 218 additions and 0 deletions
+9
View File
@@ -47,3 +47,12 @@ jobs:
env:
CI: "true"
run: npm run test:perf-guard
# Same build: axe's WCAG 2.2 A/AA checks per main screen against
# scripts/a11y-guard/budget.json, plus keyboard checks axe can't make.
# Runs even when the perf guard failed, so both results show.
- name: Run accessibility guard
if: success() || failure()
env:
CI: "true"
run: npm run test:a11y-guard