Skip to main content

A List Apart: Articles: Accessible Web 2.0 Applications with ...

Popularity Report

Total Popularity Score: 0

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Rank

Public Sticky notes

For example, currently the only way to give focus to a flickr text input is by clicking on it with a mouse. With tabindex="0", it would become keyboard accessible. Moreover, the tabindex value can be negative. Elements with a negative tabindex can receive focus via scripting, but are excluded from tab order. This feature was introduced by Microsoft in Internet Explorer 5.01 and has been implemented in Firefox from version 1.5 on.

As a reminder, here is a table with the values and behavior of tabindex:

Can get focus Tab navigable
no tabindex default (only form elements and links) default
tabindex="-1" yes no, authors have to program element.focus() in the event of onkeydown for arrow or other keys
tabindex="0" yes yes, in the order as elements appear in the source code
positive, e.g. tabindex="100" yes yes, the tabindex specifies the tab order of elements. These elements get focus before any elements with tabindex="0" or without tabindex.

Highlighted by missiontobe