Skip to content
Clairos Learn

Accessibility · Lesson 5 of 8 · 7 minutes

Accessibility: Visible focus

A keyboard target needs an obvious focus indicator. Do not remove outlines without an equally visible replacement.

Mastery 0/3Run itExplain itApply it
Web workshopInert preview · code inspection

Current edit

PreviewNo external resources

Understand the pattern

A keyboard target needs an obvious focus indicator. Do not remove outlines without an equally visible replacement.

A keyboard target needs an obvious focus indicator. Do not remove outlines without an equally visible replacement.

Misconceptions to reject

  • A visual appearance alone guarantees the intended HTML meaning.
  • Replacing semantic elements with generic divs automatically improves accessibility.

The preview is a sanitized subset, not a full browser compatibility test.

Worked example and expected result
<a href="#content" class="skip-link">Skip to content</a><main id="content" tabindex="-1"><h1>Keyboard practice</h1><button type="button">Continue</button></main>

A keyboard target needs an obvious focus indicator. Do not remove outlines without an equally visible replacement.

Try a variation

Adapt the final example to a different project name while retaining its structure and relationships. A different context still needs a real browser and accessibility check.

Explain it

Which statement correctly explains visible focus?

Apply it elsewhere

You reuse visible focus in a different project. What must still be verified?

Keep the momentum.

Complete the lab, then explain and apply the pattern.

Next: Accessibility: Status announcementsTry an incident drill

Anonymous lesson and mastery progress lasts for this session. Sign in to keep synced lesson XP between sessions; mastery stays device-local. No speed bonus, lost lives, or hint penalties.

Keep learning

  1. 01Accessibility: Keyboard orderNative links and buttons participate in keyboard navigation in source order. Positive tabindex usually creates surprising jumps.Practice
  2. 02Accessibility: Status announcementsrole="status" communicates non-urgent updates without requiring an interrupting alert or focus change.Practice
  3. 03Accessibility: Heading structureHeadings organize navigable topics. Styling a paragraph to look large does not give it heading semantics.Practice