Button pressed state is not conveyed

Link to Button pressed state is not conveyed copied to clipboard

The pressed state of a button is not conveyed to screen reader users

Rule ID:
button-state-pressed
User Impact:
Serious
WCAG :
4.1.2.a

Rule

The state of user interface components must be programmatically determinable by assistive technologies.

Background

When a button has a visual "pressed" state, that information must also be conveyed programmatically for screen reader and other assistive technology users.

How to Fix

Fix this issue by adding the aria-pressed attribute to the button element and setting its value to "true" when the button is pressed.

Additional Resources