A modal dialog should declare aria-modal
Rule
dialog-modal· Component patterns (best practice) · impact minor · Static + live
Why it matters
aria-modal="true" tells assistive technology that content outside the dialog is inert while it is open, so AT confines reading to the dialog. Omitting it can let screen-reader users wander out of a modal.
How to fix
Add aria-modal="true" to modal dialogs (and actually keep focus and AT inside the dialog while open); declare aria-modal="false" on intentionally non-modal dialogs. Native
Example
<div role="dialog" aria-label="Confirm">Are you sure?</div>
<div role="dialog" aria-label="Confirm" aria-modal="true">Are you sure?</div>
Example
<div role="dialog" aria-label="Chat">Hi there</div>
<dialog aria-label="Settings"><button>Close</button></dialog>
Native
WCAG success criteria
4.1.2 Name, Role, Value — Level A
Every UI component must expose a correct name, role, and (where relevant) state/value to assistive technology.
Standards
This rule contributes to the following standards:
WCAG A EN 301 549 Best practice
| Standard | Criteria |
|---|---|
| EN 301 549 | 9.4.1.2 |