Skip to main content

What is a tabindex?

Information about the article

Portrait of Dmitry Dugarev wearing glasses in a black shirt and smiling

Author: Dmitry Dugarev

Consultant for digital accessibility & IT compliance

Last updated on:

The tabindex is an HTML attribute that controls the tabbing order of interactive elements on a webpage. It allows developers to set the order in which elements receive focus when the user uses the Tab key [1].

Some important values for the tabindex attribute are:

  • tabindex="0": The element is focusable and is included in the natural tabbing order of the page.
  • tabindex="-1": The element is focusable but is not included in the tabbing order. It can only be focused programmatically.
  • tabindex="positive Zahl": The element is focusable and is considered in the tabbing order before elements with tabindex="0". The order is determined by the magnitude of the number (lower numbers first).

Using the tabindex attribute is important for website accessibility, as it ensures that users who rely on keyboard navigation have a logical and predictable order when navigating through interactive elements.

Further information about the tabindex attribute can be found in the official documentation [1].

  1. WHATWG, “HTML Standard — The tabindex attribute.” 2024. [Online]. Available: https://html.spec.whatwg.org/multipage/interaction.html#attr-tabindex

About the author

Portrait of Dmitry Dugarev wearing glasses in a black shirt and smiling

Best regards,

Dmitry Dugarev

Founder of Barrierenlos℠ and developer of the Semanticality™ plugin. With a master’s degree, over 8 years of experience in web-development & IT-Compliance at Big Four, Bank and Enterprise, and more than 1,000 web pages tested for accessibility for over 50 clients, I help web teams implement accessibility in a structured way — without months of redevelopment.

Become an EAA Expert Developer yourself - in just 4 days.

Learn in our 4-day workshop how to conduct complex audits and develop accessible components yourself. Get a personalized learning plan, 1:1 strategy coaching, and a certificate.

Register for the EAA Workshop now