Reviewing tabindex

The tabindex attribute allows developers to:

  1. Make HTML elements focusable
  2. Allow or prevent HTML elements from being sequentially focusable
  3. Determine HTML elements relative ordering for sequential focus navigation

A positive number

A positive value means the element should be focusable in sequential keyboard navigation, with its order defined by the value of the number. The maximum value for tabindex is 32767.

A "0" number

tabindex="0" means that the element should be focusable in sequential keyboard navigation, after any positive tabindex values. The focus navigation order of these elements is defined by their order in the document source.

A "-1" number

A negative value means that the element is not reachable via sequential keyboard navigation. JavaScript can be used to send focus to the element.