URL: /rules/a11y/aria-command-name

---
title: "ARIA Command Name"
description: "Checks that command elements have accessible names"
---

Checks that command elements have accessible names

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

## Solution

Command elements (buttons, links, menu items) must have accessible names. Add text content, aria-label, aria-labelledby, or title attribute. For icon-only buttons, use aria-label to describe the action (e.g., aria-label='Close').

## Enable / Disable

### Disable this rule

```toml squirrel.toml
[rules]
disable = ["a11y/aria-command-name"]
```

### Disable all Accessibility rules

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

### Enable only this rule

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