Project | Accessibility
Accessibility and Visual Regression Testing
WCAG 2.2 AA checks with axe-core in light and dark mode and in every state, keyboard and focus tests for what axe cannot see, reflow and reduced motion, and 21 screenshot baselines rendered in the Playwright Linux image with zero pixel tolerance.
Eight realistic defects are planted in a regressed build of the app, and the suite must report each one with the check named for it: all eight are caught.
Evidence checked 17 Oct 2026 | CI run #1 on main
On this page
Problem and purpose
Functional tests let two kinds of bugs through: a page that keyboard, screen reader or zoom users cannot use, and a page that works but looks wrong. This project checks both automatically and proves the checks work: a suite that has only ever been green has not shown that it can fail.
Architecture
app/server.ts ── baseline build (port 4310) ──► a11y: axe scans · keyboard · focus · reflow (must be clean)
│ └─► visual: 21 baselines, 0 px tolerance (must match)
└─ --variant regressed (8 defects, port 4311) ──► defects: each defect ──► named check ──► expected findingTechnology and tools
| Area | Tools |
|---|---|
| Language | TypeScript 6 on Node 24 (the app runs as TypeScript directly, no dependencies) |
| Accessibility | @axe-core/playwright with WCAG 2.0/2.1/2.2 A + AA and best-practice rules; keyboard, focus and layout checks written for this project |
| Visual | Playwright toHaveScreenshot, baselines rendered only in the official Playwright Linux image, zero pixel tolerance |
| Tests | 86 Playwright tests (Chromium, Firefox, visual, planted defects) and 28 node:test unit tests |
| CI | GitHub Actions: checks, accessibility in two browsers, visual and defects inside the Playwright image, scan summary in the job summary |
Engineering decisions and approach
- Page objects (one per page, a cancel-dialog component, booking data); locators by role and visible label, so a missing label already breaks a test
- States, not only pages: errors shown, confirmation, open dialog, and every page in dark mode
- Keyboard checks return findings instead of asserting, so one implementation proves the good build passes and the broken build fails
- Known issues live in an exceptions file with ticket and expiry date, matched by element; an unused exception fails the build
- Baselines only from the Playwright Linux image (Docker locally, a container job in CI), so any different pixel is a real change
- Each planted defect is an exact-once text replacement; if a refactor removes its text, a unit test fails instead of the defect silently disappearing
Test scope and execution approach
Project-specific checks and execution details documented in the repository:
- Tab order, visible focus on every stop, skip link, error summary focus, dialog focus trap with Escape and focus return
- Reflow at 320 CSS px, increased text spacing and reduced motion
- Found real problems in its own app: a nearly invisible focus ring in a date field, hidden text widening the page at 320 px, contrast measured mid-animation
- Report with expected, actual and diff images for every changed screenshot
- Markdown scan summary with blocking findings, excused findings and their tickets, and what axe could not decide
- Design notes and 78 interview questions on accessibility and visual testing, linked to the code (Markdown + PDF)
Results with dated evidence
Historical repository or workflow evidence · older evidence; recheck the linked source
CI run #1 on main
Eight realistic defects are planted in a regressed build of the app, and the suite must report each one with the check named for it: all eight are caught.
Evidence checked: | Open dated evidence
Evidence explorer
Static screenshots are labelled as images; dated workflow links identify the execution evidence and its check date.
Static material from the public repository. The linked verification record was checked 2026-10-17; that date is not a screenshot capture date.
Dated workflow record
Evidence checked 2026-10-17. Open CI run #1 on main
Local setup and execution
npm ci
npx playwright install chromium firefox
npm test :: everything; screenshots skipped outside Linux
npm run docker :: everything inside the Playwright Linux image
npm run test:defects :: every planted defect must be caughtWorkflow and reports
Known limitations
- Automated checks find a part of WCAG issues; screen reader testing and content review stay manual
- Baselines cover Chromium only; a product supporting several browsers would need baselines per browser
- The evidence is limited to the public repository and linked run; it does not establish customer production impact.