Skip to main content
Version: v6

A toggle button element is missing an aria-pressed attribute

A toggle button element is missing an aria-pressed attribute — rule summary
FieldValue
Rule codeManual_Button_State_Missing
WCAG conformance levelA
WCAG success criterion4.1.2 Name, Role, Value
Must be fixed at sourceNo

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.