HTML - tabindex attribute (tab order)

About

The tabindex global attribute Specifies whether:

  • the element represents an element that is is focusable (that is, that you can click or navigate with tab or an element which is part of the sequence of focusable elements in the document),
  • the relative order of the element in the sequence of focusable elements in the document

Sequential keyboard navigation

Taborder

The tab order is the following:

  • tabindex value from 1 to N
  • tabindex with a value of 0 in document order
  • other interactive element on the page that have not a tabindex=“-1”

Remove

remove it from the tab order by setting tabindex=“-1”

Add

  • tabindex=“0”:
    • element is focusable in sequential keyboard navigation,
    • order is defined by the document's source order.

Documentation / Reference


Powered by ComboStrap