Skip to content
BENIBIX Learn

Tab Order

Design♿ AccessibilityKeyboard and Touch

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

Tab order is the order in which the Tab key moves from one control to the next. It should follow the order people read the page, from top to bottom. By default it follows the order in the code. If the code and the screen are in a different order, the focus jumps around and people get lost. A tabindex number above 0 forces an order, and that most often makes it worse.

Example code

html
<div tabindex="0">Can be reached with Tab</div>
<div tabindex="-1">Only reachable by script</div>
0 puts a part in the normal order. Avoid numbers above 0; they jump the queue.
Tab moves through the form in the same order you read it.

Common mistake

Fixing a jumbled order with tabindex numbers. Fix the order in the code instead.

Key takeaways

  1. 1
    Follows reading order. Top to bottom.
  2. 2
    Comes from the code. Keep code in order.
  3. 3
    No positive tabindex. It makes things worse.