Question

Like title says, what is the order for the tabindex attribute in html?

Answer

Code example:

1
2
3
4
5
6
7
<input tabindex="3">
<input tabindex="0">
<input tabindex="-1">
<input>
<input tabindex="2">
<input tabindex="1">
<span tabindex="4"> This wouldn't normally receive focus</span>

Order:


(3) Will receive focus third

(0) In normal source order

(-1) Will not receive focus

(n/a) In normal source order

(2) Will receive focus second

(1) Will receive focus first

<span tabindex="4">This wouldn't normally receive focus</span> has (4) largest value. Next tab will give focus to the rest of tabnavigable elements in code source order.

Reference


This is the end of post