In this lesson, you put the checks from the last three lessons together into a four-step accessibility audit of the work day sign-up page, and saw what Lighthouse’s automated score can’t see.
Key Points
- An audit is four checks, in this order:
- The keyboard needs no tools and finds what a visitor can’t reach. Click the site name, press Tab, and follow the outline. Then operate each control with its keys. The arrow keys pick a task in the group, Space ticks the gloves checkbox, and Shift+Tab takes you back up the page. Check contrast in error states and zoom here too, as in Check Contrast and Zoom, because Lighthouse sees only the page as it loads.
- The Accessibility pane shows what a screen reader will be told. Inspect each control you tabbed to: its role and name should match what a visitor sees. Email is a textbox named by its label, Email (required), with its error message as the description, and the Sign up button is a button, named by its own text, Sign up.
- Lighthouse runs the checks a machine can measure. In DevTools, open the Lighthouse panel, tick only Accessibility, and click Analyze page load. It reloads the page, checks things like labels, names, contrast, and language, and scores the page from 0 to 100.
- A screen reader confirms it all by ear. The steps are in Your Own Screen Reader Pass below.
- The keyboard and the pane come first, before Lighthouse, so a Lighthouse 100 can’t talk you out of them.
- The keyboard found Tomás’s change. He gave the nav’s last item
order: -1so About shows first, the same rule you tried in Use the Page With the Keyboard Alone. Tab went Home, Plots, Volunteers, Events, Work Day, Seed Swap, then jumped back to About at the front, because CSS moved the box but not its place in the HTML. - Lighthouse gave that page 100. It never presses Tab, so it couldn’t see focus jump backward. Under the score, it lists ten Additional items to manually check, among them Visual order on the page follows DOM order, the order of the HTML.
- A Lighthouse 100 means every check Lighthouse scores has passed, like a test suite that proves only what it tests. It doesn’t mean every visitor can use the page. The same page also scores 100 with its focus outline removed, or with Sign up turned into a
<div>. It’s one check passed out of four. - To fix it, take out the
order: -1rule. If Rosa still wants About first, move its<li>to the top in the HTML. - Chrome’s full accessibility tree is what a screen reader reads. The sign-up page has four landmarks: the header (banner), the nav (navigation), main, and the footer (contentinfo). Inside main, each form field has its role and name.
Your Own Screen Reader Pass
Run a short pass with a screen reader on the sign-up page you built. On a Mac, use VoiceOver, which comes with macOS. On Windows, use Narrator, which comes with Windows, or NVDA, a free download.