Accessibility · Middle · Question 28 of 75
How do you make a toggle button's state available to assistive tech?
- 1
aria-pressed="true"or"false"with a stable label - 2Set
role="radio"on the button when it's active - 3Change the label and set
aria-pressedat the same time
Show the answer
Correct answer: aria-pressed="true" or "false" with a stable label
Explanation
Pick one: state with a stable name ("Mute", pressed) or a label that changes ("Mute" to "Unmute"). Doing both reads as "Unmute, pressed".