What is accessibility testing, what standard governs it, and what tool automates it in a Playwright pipeline?
- Accessibility testing checks whether people with disabilities can use the application — screen reader users, keyboard-only users, colorblind or low-vision users.
- The standard is WCAG (Web Content Accessibility Guidelines), organized around four principles: Perceivable, Operable, Understandable, Robust — POUR.
- WCAG has three conformance levels, A/AA/AAA — AA is the industry-standard target.
- The automation tool is axe-core, plugged in via `@axe-core/playwright`, run as part of the CI pipeline.
The long answer
Accessibility testing verifies the application is usable by people with disabilities, not just able-bodied users clicking with a mouse. This includes screen-reader users, people who navigate entirely by keyboard, colorblind users, and people with low vision using magnification.
The governing standard is WCAG, structured around four principles, POUR:
-
Perceivable — can content be seen or heard (alt text on images, sufficient color contrast)
-
Operable — can the page be navigated without a mouse (keyboard tab order, visible focus indicators)
-
Understandable — is content and navigation predictable and readable
-
Robust — does it work correctly with assistive technology (proper semantic HTML, correct ARIA attributes)
WCAG defines three conformance levels — A, AA, AAA — with AA being the level most companies target both practically and for legal compliance.
The automation tool is axe-core, a JavaScript library that scans a rendered page against WCAG rules and returns a list of violations (missing alt text, poor contrast, missing ARIA labels, broken heading structure) with severity and rule references. It integrates directly into Playwright via @axe-core/playwright, so a scan can run as part of the existing test suite and be wired into the CI pipeline — failing the build if violations exceed a threshold.
Important connection: axe-core catches roughly 30–40% of real accessibility issues — the mechanical, rule-based violations. The rest requires manual checks (tabbing through with no mouse, listening with a screen reader like NVDA or VoiceOver) — judgment-based work, not something automated tooling covers, and not something an SDET typically owns end-to-end.
Bonus connection worth stating in an interview: accessibility compliance and testability often overlap. Proper semantic HTML and ARIA attributes — needed for screen readers — are exactly what makes Playwright locators like getByRole and getByLabel stable and reliable. Pushing developers toward WCAG-AA compliance via axe-core in CI tends to produce better test locators as a side effect. Where semantic HTML isn’t feasible, data-testid attributes are the separate fallback convention purely for automation, not accessibility.
Saying "we manually test accessibility" without naming axe-core, or confusing accessibility testing with general usability testing — accessibility specifically targets users with disabilities and is governed by the WCAG standard, not just "is this easy to use."