URL: /rules/a11y/aria-required-attr

---
title: "ARIA Required Attributes"
description: "Checks that elements have required ARIA attributes for their roles"
---

Checks that elements have required ARIA attributes for their roles

| | |
|---|---|
| **Rule ID** | `a11y/aria-required-attr` |
| **Category** | [Accessibility](/rules/a11y) |
| **Scope** | Per-page |
| **Severity** | error |
| **Weight** | 7/10 |

## Solution

Some ARIA roles require specific attributes to be present. For example, role='checkbox' requires aria-checked, role='slider' requires aria-valuenow. Add the missing required attributes with appropriate values.

## Enable / Disable

### Disable this rule

```toml squirrel.toml
[rules]
disable = ["a11y/aria-required-attr"]
```

### Disable all Accessibility rules

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

### Enable only this rule

```toml squirrel.toml
[rules]
enable = ["a11y/aria-required-attr"]
disable = ["*"]
```
