0PricingLogin
React Academy · Lesson

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

  1. Semantics, Labels, Roles, Focus
  2. Keyboard Interactions & Skip Links
  3. Testing A11y Basics
← Back to React Academy