A Dialog or Alert-Dialog is missing required aria attributes
| Field | Value |
|---|---|
| Rule code | Dialog_AttributeRequirement_Missing |
| WCAG conformance level | A |
| WCAG success criterion | 4.1.2 Name, Role, Value |
| Must be fixed at source | No |
Description
Dialogs and alert dialogs must have specific ARIA attributes to be fully accessible to assistive technologies. These elements should include aria-labelledby, aria-label or aria-describedby to provide sufficient context for users. Missing any of these attributes can result in incomplete or incorrect interpretation of the dialog's purpose and content by screen readers or other assistive devices. Ensure all required ARIA attributes are present for dialogs or alert dialogs. More details on ARIA role requirements are available here: https://www.w3.org/TR/wai-aria-1.1/#role_definitions.
How to fix
To resolve this issue, ensure that each dialog or alert dialog element includes the aria-labelledby, aria-label, or aria-describedby attributes to provide the necessary context for assistive technologies. When using aria-labelledby or aria-describedby, ensure they reference valid IDs associated with elements that clearly describe the dialog. These attributes are essential for conveying the dialog's purpose and content, allowing screen readers to interpret it correctly.