Testing A11y Basics
Write simple tests that catch common accessibility issues: prefer role/label queries, assert names/states, and add automated a11y checks.
Why test accessibility
Goal: Catch a11y issues early.
- Prefer role/label queries
- Assert names, states, focus
- Add an automated check (axe)
Queries that reflect real use
- getByRole with name for buttons/links
- getByLabelText for inputs
- findBy* for async UI
- Use test IDs only as a last resort
All lessons in this course
- Semantics, Labels, Roles, Focus
- Keyboard Interactions & Skip Links
- Testing A11y Basics