DONT ADD ANYTHING HERE!

  1. The tabindex content attribute specifies whether the element is focusable, whether it can be reached using sequential focus navigation, and the relative order of the element for the purposes of sequential focus navigation
  2. A negative value (the exact negative value doesn't actually matter, usually tabindex="-1") means that the element is not reachable via sequential keyboard navigation
  3. tabindex="0" means that the element should be focusable in sequential keyboard navigation, after any positive tabindex values
  4. A positive value means the element should be focusable in sequential keyboard navigation, with its order defined by the value of the number
  5. That is, tabindex="4" is focused before tabindex="5" and tabindex="0", but after tabindex="3"
  6. The maximum value for tabindex is 32767
  7. You are recommended to only use 0 and -1 as tabindex values

Example

HTML

<p>Click anywhere in this pane, then try tabbing through the elements</p>

<label>First in tab order:<input type="text" /></label>

<div tabindex="0">Tabbable due to tabindex.</div>

<div>Not tabbable: no tabindex.</div>

<label>Third in tab order:<input type="text" /></label>
                            

Browser

Click anywhere in this pane, then try tabbing through the elements

Tabbable due to tabindex.
Not tabbable: no tabindex.

Notes

Mnemonic

References