--- url: "https://webaim.org/techniques/keyboard/tabindex" titulek: "WebAIM: Keyboard Accessibility - Tabindex" h1: "Keyboard AccessibilityTabindex" popis: "" jazyk: "en" kanonicka: "" drobecky: ["You are here:", "Home", "Articles", "Keyboard Accessibility"] zdroj: "live" wayback_snapshot: "" stazeno: "2026-09-14 06:49:01" znaku: 3620 slov: 586 kodovani: "utf-8" sha256: "0d11e5fec4ad958be972ac55c7d37f4239d4bfdc2e01b28bd94412a417c51a6b" --- # Keyboard Accessibility Tabindex You are here: [Home](/) > [Articles](/articles/) > [Keyboard Accessibility](./) > Page 2: Tabindex ## Overview The `tabindex` attribute has three distinct uses: - `tabindex="1"` (or any number greater than 1) defines an explicit tab or keyboard navigation order. **This must always be avoided.** - `tabindex="0"` allows elements besides links and form elements to receive keyboard focus. It does not change the tab order, but places the element in the logical navigation flow, as if it were a link/button on the page. - `tabindex="-1"` allows things besides links and form elements to receive "programmatic" focus, meaning focus can be set to the element through scripting. ## The `tabindex` Attribute The `tabindex` attribute of 1+ explicitly defines the navigation order for focusable elements (typically links and form controls) within a page. It can also be used to define whether elements should be focusable or not. Important `tabindex` values of 1+ must be avoided. These elements will receive keyboard focus before elements with no `tabindex` value (or `tabindex="0"`) resulting in a navigation order that is different from the visual and/or screen reader order. Instead of using `tabindex`, simply adjust the page's source code order to support a logical navigation and reading order, then use CSS to adjust the visual presentation. ## `0` and `-1` Values `tabindex="0"` and `tabindex="-1"` have special meaning and provide distinct functionality in HTML. ### `tabindex="0"` A value of 0 indicates that the element should be placed in the default navigation order. This allows elements that are not natively focusable (such as `