A toggle button element is missing an aria-pressed attribute
| Field | Value |
|---|---|
| Rule code | Manual_Button_State_Missing |
| WCAG conformance level | A |
| WCAG success criterion | 4.1.2 Name, Role, Value |
| Must be fixed at source | No |
Description
Elements that act as toggles and that have trigger functionality need aria-pressed attributes set to false when inactive/not pressed, and need aria-pressed attribute set to true when active/pressed. Without aria-pressed attributes, the active state of buttons or similar elements is not recognized by Screen Readers.
How to fix
Ensure elements that function as buttons with toggle capabilities have the correct state added via the "aria-pressed" attribute, with a value of "true" or "false" depending on their active state.