WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: [EXTERNAL]Exposing the selected state of buttons

for

From: Mark Magennis
Date: Dec 9, 2019 5:07AM


Sudheer,

Be particularly careful if any of your users are likely to be using IE11. aria-pressed hardly works in IE11. JAWS reads the state only when aria-pressed=true, not when it is false, and doesn't announce state changes (when you press the button). NVDA only reads the state and announces state changes when aria-pressed=true, not false.

JAWS/Firefox doesn't work well either. Like NVDA/IE11, it only reads the state and announces state changes when aria-pressed=true, not false. I haven't looked to see what happens in Chrome.

For these reasons, my company's Toggle Button coding pattern doesn't use aria-pressed. There are other ways to reliably give a similar experience. A pity, because aria-pressed should be perfect for toggle buttons.

Mark

Mark Magennis
Skillsoft | mobile: +353 87 60 60 162
Accessibility Specialist