WebAIM - Web Accessibility In Mind

E-mail List Archives

Using aria-selected=true on any HTML element?

for

From: Paul J. Adam
Date: Aug 21, 2012 1:36PM


The WAI-ARIA spec states that the aria-selected state is only used in roles gridcell, option, row, and tab. <http://www.w3.org/TR/wai-aria/states_and_properties#aria-selected>;

Is it bad to use aria-selected=true on a HTML widget with a selected state that does not fall into one of these roles? Like a list item or link?

If aria selected should not be used on links or list items then how would you communicate state to a screen reader? Visually hidden text? Title attribute?

Adding aria-selected to a HTML element does cause VoiceOver to speak the text "selected" even if it's not one of the supported roles.

Thoughts?

Paul J. Adam
Accessibility Evangelist
Deque Systems
<EMAIL REMOVED>
www.PaulJAdam.com
@pauljadam on Twitter