1st
TabIndex esempi da W3C
Attribute definitions
- tabindex = number [CN]
- This attribute specifies the position of the current element in the tabbing order for the current document. This value must be a number between 0 and 32767. User agents should ignore leading zeros.
The tabbing order defines the order in which elements will receive focus when navigated by the user via the keyboard. The tabbing order may include elements nested within other elements.
Elements that may receive focus should be navigated by user agents according to the following rules:
- Those elements that support the tabindex attribute and assign a positive value to it are navigated first. Navigation proceeds from the element with the lowest tabindex value to the element with the highest value. Values need not be sequential nor must they begin with any particular value. Elements that have identical tabindex values should be navigated in the order they appear in the character stream.
- Those elements that do not support the tabindex attribute or support it and assign it a value of “0” are navigated next. These elements are navigated in the order they appear in the character stream.
- Elements that are disabled do not participate in the tabbing order.
The following elements support the tabindex attribute: A, AREA, BUTTON, INPUT, OBJECT, SELECT, and TEXTAREA.
In this example, the tabbing order will be the BUTTON, the INPUT elements in order (note that “field1” and the button share the same tabindex, but “field1” appears later in the character stream), and finally the link created by the A element.
br /> "http://www.w3.org/TR/html4/strict.dtd">
A document with FORM
...some text...Go to the
W3C Web site.
...some more...
tabindex="1" onclick="get-database">
Get the current database.
...some more...
Tabbing keys. The actual key sequence that causes tabbing navigation or element activation depends on the configuration of the user agent (e.g., the “tab” key is used for navigation and the “enter” key is used to activate a selected element).
User agents may also define key sequences to navigate the tabbing order in reverse. When the end (or beginning) of the tabbing order is reached, user agents may circle back to the beginning (or end)