Skip to main content
Checks that dialog elements have accessible names
Rule IDa11y/aria-dialog-name
CategoryAccessibility
ScopePer-page
Severityerror
Weight7/10

Solution

Elements with role=‘dialog’ or role=‘alertdialog’ (and native <dialog>) must have an accessible name. Add aria-label with a descriptive label, or use aria-labelledby pointing to a visible heading inside the dialog. A title attribute also works but is less preferred. Without a name, screen reader users won’t know the purpose of the dialog.

Enable / Disable

Disable this rule

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

Disable all Accessibility rules

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

Enable only this rule

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