Structure and accessibility · Lesson 14 of 16
Keyboard and screen-reader access
Clear names, natural order and native controls.
8 minutes2 games
Start with native elements: button for actions and a for navigation. Keep a logical HTML order for reading and Tab navigation. A skip link lets users reach the main content without traversing every navigation link.
HTML
<a href="#main">Skip to content</a> <nav aria-label="Main"><a href="#courses">Courses</a></nav> <main id="main" tabindex="-1"> <h1 id="courses">Courses</h1> <button type="button">Save lesson</button> </main>
Tab to navigate
Name describes purpose
Enter or Space as supported
Visible focus location
Quick question
Which element suits a save action?
Exercise
Add a skip link targeting main with id content, containing an h1.
HTML
Learn more from
Played 0 of 2 games
Sign in to save your progress and earn XP.