Positive tabindex Anti-Pattern Check
Classifies an explicit parsed tabindex integer: positive values request an ordering priority, zero follows ordinary sequential order, negative requests exclusion from sequential navigation. Disabled, inert and browser focus preferences are outside this attribute-only check.
Description
The tabindex attribute expresses focus ordering preferences.
The tabindex attribute expresses focus ordering preferences. Positive values introduce ordering priorities that can make keyboard navigation diverge from document order.1
Classifies an explicit parsed tabindex integer: positive values request an ordering priority, zero follows ordinary sequential order, negative requests exclusion from sequential navigation. Disabled, inert and browser focus preferences are outside this attribute-only check.
When to use Positive tabindex Anti-Pattern Check
Use this for the following task: Classifies an explicit parsed tabindex integer: positive values request an ordering priority, zero follows ordinary sequential order, negative requests exclusion from sequential navigation. Disabled, inert and browser focus preferences are outside this attribute-only check.
Prepare the parsed attribute values, element states or ordered local lists requested below. Keep attribute presence separate from value.
How to use Positive tabindex Anti-Pattern Check and understand its results
- Prepare the parsed attribute values, element states or ordered local lists requested below. Keep attribute presence separate from value.
- Enter tabindex using the field table, then run the tool.
- Read positiveOrdering, requestsSequentialFocus, requestsProgrammaticFocus. Interpret flags, units, ordering and placeholder values using the rules below.
- Review any reported issue or failed check, correct the supplied values when appropriate, and verify the result in its intended context.
| Input field | Meaning | Value type and bounds | Requirement |
|---|---|---|---|
| tabindex | Tabindex | integer; minimum -9007199254740991 | Required |
Enter a parsed integer. Zero requests ordinary sequential navigation; a negative value requests exclusion from that sequence. Programmatic focus is reported as requested for every accepted integer.2
positiveOrdering = tabindex > 0; requestsSequentialFocus = tabindex ≥ 0 This summarizes the declared operation. Units, indexing, inclusivity and exceptional cases are explained in the surrounding text.
| Output field | Meaning | Value type |
|---|---|---|
| positiveOrdering | Positive Ordering | boolean |
| requestsSequentialFocus | Requests Sequential Focus | boolean |
| requestsProgrammaticFocus | Requests Programmatic Focus | boolean |
{
"input": {
"tabindex": 3
},
"output": {
"positiveOrdering": true,
"requestsSequentialFocus": true,
"requestsProgrammaticFocus": true
}
} Limitations and assumptions
These are attribute requests rather than guarantees of actual focusability. Disabled, inert and browser preferences need separate checks.
This evaluates supplied local information; it does not fetch a page or run a browser. Malformed requests produce input errors. A successfully evaluated request can still contain false flags, empty result lists or a result outside the supplied threshold; those outcomes have the meanings stated above.
Alternative or Complementary methods
Choose inert Focus Suppression Lookup for this operation: Resolves inert attribute restrictions from own and inherited flat-tree inertness. A modal dialog opened with showModal escapes inherited inertness, while its own inert attribute still applies. Other disabling and focus rules are separate. For a complementary task, use role=presentation vs none Equivalence for this operation: Resolves equivalent presentation/none roles on an element, including focusable or otherwise interactive elements and global ARIA conflict resolution. Reports removal of this element's own implicit semantics; required owned descendants need separate checks.
Further background: HTML / accessibility reference: Positive tabindex Anti-Pattern Check.
References
Similar or alternative tools
- inert Focus Suppression Lookup
Resolves inert attribute restrictions from own and inherited flat-tree inertness. A modal dialog opened with showModal escapes inherited inertness, while its own inert attribute still applies. Other disabling and focus rules are separate.
- role=presentation vs none Equivalence
Resolves equivalent presentation/none roles on an element, including focusable or otherwise interactive elements and global ARIA conflict resolution. Reports removal of this element's own implicit semantics; required owned descendants need separate checks.