Module 39: Frontend Quality

Lesson 3 of 5 · 15–25 minutes

Accessibility in React apps

🏠The everyday picture

A lift that announces each floor and has braille buttons. It takes little extra effort at installation, and a lot of effort to add later.

📘What it really is

Everything from Modules 12, 13 and 35, plus the problems single-page apps add:

🖱️Try it

Make each page set document.title and focus its <h1> on arrival (give it tabIndex={-1} so it can receive focus). Add an axe check to two of your component tests. Then use your phone's screen reader to add an enquiry from start to finish, and fix the first problem you find.

✅Quick check

Why move focus to the heading after a route change?

Show the answer

Otherwise screen-reader users may not know the page changed, and keyboard users start from the wrong place.

Lighthouse gives 100 for accessibility. Is the app fully accessible?

Show the answer

Not necessarily. Automated tools find only some problems; test with a keyboard and a screen reader too.

← PreviousTesting with APIs
ProLearners Assist