URL: /rules/a11y/tabindex

---
title: "Tabindex Values"
description: "Checks for appropriate tabindex values"
---

Checks for appropriate tabindex values

| | |
|---|---|
| **Rule ID** | `a11y/tabindex` |
| **Category** | [Accessibility](/rules/a11y) |
| **Scope** | Per-page |
| **Severity** | warning |
| **Weight** | 5/10 |

## Solution

Avoid positive tabindex values (1, 2, 3...) as they override natural tab order and confuse keyboard users. Use tabindex='0' to add elements to tab order, tabindex='-1' to make elements focusable via JavaScript only. Rely on natural document order for tab sequence.

## Enable / Disable

### Disable this rule

```toml squirrel.toml
[rules]
disable = ["a11y/tabindex"]
```

### Disable all Accessibility rules

```toml squirrel.toml
[rules]
disable = ["a11y/*"]
```

### Enable only this rule

```toml squirrel.toml
[rules]
enable = ["a11y/tabindex"]
disable = ["*"]
```
