♿Tab Order
Also known as Focus Order, Tabindex, Keyboard Order
The order the Tab key moves through the controls on a page.
Think of it like
It is like a line of kids waiting for a slide. Each one goes in turn, front to back.
Example
In a form, Tab jumps from Name to the footer and back to Email. The fields were placed out of order in the code.
Why it matters
A jumbled order makes a simple form feel like a maze for keyboard users.
Definition
Example code
html
<div tabindex="0">Can be reached with Tab</div>
<div tabindex="-1">Only reachable by script</div>Common mistake
Key takeaways
- 1Follows reading order. Top to bottom.
- 2Comes from the code. Keep code in order.
- 3No positive tabindex. It makes things worse.