In this lesson, you checked each line of the borrowing FAQ’s contract in the order its users meet the accordion:
- Keyboard first. Click the page’s heading so Tab starts below the site links, then press Tab. Focus lands on the first question, with the green ring inside its border. Enter opens it, Tab moves to the next question, and Space opens it and closes it again. That’s a sample. Walk every question the same way, backward with Shift+Tab too, and the contract’s keyboard and focus lines are checked.
- Then the screen reader’s view, the accessibility tree. In this lesson’s run in Chromium on November 29, 2026, the Accessibility pane gave the first question’s summary the role DisclosureTriangle, the question as its name, and Expanded false. After Space, Expanded turned true, with the answer right after the summary. That checks role, name and states.
- Then your own screen reader. Turn on VoiceOver with Cmd+F5, according to Apple’s VoiceOver User Guide, or NVDA with Ctrl+Alt+N, as NVDA’s User Guide explains, and listen for the same name and states.
- Then the automated tools. axe DevTools, the free browser extension, finds no violations on the page as it loads. Every answer is closed then, so that only covers what’s showing. Open each question in turn and run axe again. There are still no violations, so names, headings and the answers’ text contrast all pass.
- Measure what axe leaves. Scroll so a heading sits under the sticky header, and axe can’t decide that contrast pair. Axe DevTools lists it under Needs Review. Measure it yourself: its text comes to 14.21:1. Axe checks text only, so measure the border too: 4.57:1 on the page’s surface, above the 3:1 it needs. On the answer’s panel, as in the previous lesson, it’s 4.24:1.
- What the tools can’t see. With
outline: noneadded to the summary’s focus rule in the Styles pane, the ring disappears, and axe still shows no violations, because none of its rules asks whether you can see where focus is. That’s why the keyboard comes first. - What Lighthouse leaves to you. Lighthouse’s accessibility audit reloads the page, dropping that edit, and scores it 100, but it still lists ten items under Additional items to manually check, such as a logical tab order. It can’t settle those automatically, so they’re yours.
- Then the settings people choose. Open the Command Menu with Ctrl+Shift+P, or Cmd+Shift+P on macOS, and run Show Rendering. When you emulate forced colors, the green gives way to system colors, but the border, the marker and the line under the open question all stay. When you emulate reduced motion and open a question, the answer appears at once, because the accordion has no motion. A fail would be an animation that still runs.
- Light and dark. Emulate a dark color scheme. Kwame’s page now supplies dark values for its tokens in
base.css, and the accordion follows them without a rule of its own. Repeat the checks in dark. The ring shows on a closed question and an open one, axe finds no violations with each question open, and the border measures 5.6:1 on the page’s surface.
Verify a component the way its users meet it: keyboard first, then the screen reader, then the automated tools, then the settings people choose. If the tools go first, a clean report feels like the end. Start with the keyboard, and you’ve already checked what they can’t see.
Here are the page’s dark values in base.css, after its :root rule:
@media (prefers-color-scheme: dark) {
:root {
color-scheme: dark;
--color-text: #e4ebe6;
--color-surface: #161d19;
--color-accent: #7cc9a0;
--color-on-accent: #10241a;
--color-border: #8b968f;
--color-panel: #22302a;
}
}