Chapter 2: Links and Navigation
73
The tabindex Attribute
To understand the tabindex attribute, you need to know what it means for an element to gain focus.
Any element that a user can interact with can gain focus.
If the user clicks the Tab key on his or...
More
Chapter 2: Links and Navigation
73
The tabindex Attribute
To understand the tabindex attribute, you need to know what it means for an element to gain focus.
Any element that a user can interact with can gain focus.
If the user clicks the Tab key on his or her
keyboard when a page has loaded, the browser moves focus between the parts of the page that the user
can interact with.
The parts of the page that can gain focus include links and some parts of forms (such
as the boxes that allow you to enter text).
When a link receives focus, and the user presses Enter on the
keyboard, the link is activated.
You can see focus working on the Google web site; if you repeatedly press the Tab key, you should see
focus pass between links on the page.
After it has passed across each link in turn, it goes onto the box
where you enter search terms, across the site’s buttons, and usually ends up back where you typed in the
URL.
Then it cycles around the same elements again as you keep pressing Tab.
Less