jQuery UI accordion and aria-expanded in JAWS

529 views
Skip to first unread message

Colin Clark

unread,
Feb 10, 2011, 12:05:29 AM2/10/11
to jquer...@googlegroups.com, Scott González
Hi everyone,

Scott asked me to take a look at this accordion bug report and share some advice:

http://bugs.jqueryui.com/ticket/6066

In JAWS 11, the value of the aria-expanded attribute is not being read correctly. I tested the latest accordion collapsible demo code with a few different screen readers. Here's what I found:

* JAWS 10 doesn't read the aria-expanded property. Each item is simply read as "Section x Tab"
* JAWS 12 correctly reads aria-expanded, informing users when a tab is "open" or "closed"
* NVDA 2010.2 also correctly reads the aria-expanded property

It's always tough to decide whether or not to include version-specific hacks and workarounds to make a widget more usable with certain ATs. In the case of ARIA, the implementations are evolving fast and such workarounds are hard to maintain and tend to cause greater complexity in code.

The workaround suggested in this bug report (and implemented in an accompanying Github pull request) involves setting both the aria-expanded and aria-selected attributes on the accordion. According to the spec, aria-selected isn't designed for use within accordions. It might give the user some indication that a particular tab has been expanded, but could also run the risk of confusing them by blurring the distinction between "selected" and "expanded."

I'd suggest sticking with the specification and guidance from the DHTML Style Guide and continue to use aria-expanded correctly without including the additional aria-selected workaround.

Colin

---
Colin Clark
Technical Lead, Fluid Project
http://fluidproject.org

Scott González

unread,
Feb 10, 2011, 9:22:01 AM2/10/11
to jQuery Accessibility
Thanks Colin. I've closed the bug as won't fix and linked to this thread.


2011/2/10 Colin Clark <colinb...@gmail.com>

Aaron

unread,
Feb 10, 2011, 10:09:25 AM2/10/11
to jQuery Accessibility
Hi all.

Thanks for looking at this. I'm the one who originally reported the
issue. (I believe I reported it a couple weeks before I upgraded to
Jaws 12.) Just so you know, I have no problem with how this was
resolved. As Colin mentioned, it is not always clear whether it is
better to implement a hack to fix a broken screen reader, or follow
the standard and let the screen reader manufacturers catch up. I
personally could go either way in this particular instance, though the
current plan is likely to be better in the long run.

Anyway, thanks again for resolving this.

Aaron

Colin Clark

unread,
Feb 10, 2011, 11:53:56 AM2/10/11
to jquer...@googlegroups.com
Aaron,

Thanks for reporting the issue in the first place! It really helps to know version-specific incompatibilities. It seems to me that, if a user of the accordion knows they have a lot of pre-JAWS 12 users, they could probably write a line or two of code to add this workaround in their own application as-needed, so this seems like a nice compromise.

Keep the bug reports coming!

Colin

> --
> You received this message because you are subscribed to the Google Groups "jQuery Accessibility" group.
> To post to this group, send email to jquer...@googlegroups.com.
> To unsubscribe from this group, send email to jquery-a11y...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/jquery-a11y?hl=en.

Reply all
Reply to author
Forward
0 new messages