Skip to content
Critiq Docs

Search docs

Search documentation pages and rules

correctness.ui

Avoid positive tabIndex values

Positive `tabIndex` values create a custom keyboard order that is fragile and usually less accessible than DOM order.

#Metadata

Rule ID
ts.react.no-positive-tabindex
Severity
medium
Confidence
0.85
Languages
javascript, typescript
Presets
strict
Stability
experimental
Applies to
function
Tags
accessibility, react, rules-catalog, ui

#Why it matters

Manual focus sequencing is easy to break as layouts evolve and makes keyboard navigation less predictable for assistive-technology users.

#Remediation

Prefer source-order focus flow, use `tabIndex={0}` only when needed, and reserve negative values for programmatic focus targets.

#Repository path

The generated metadata points to critiq-rules/libs/rules/catalog/rules/typescript/ts.react.no-positive-tabindex.rule.yaml.