WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Using ARIA for styling?

for

From: Birkir R. Gunnarsson
Date: Mar 6, 2017 9:48AM


To deal with the problem of aria-current not being well supported yet,
you could add a title element="selected" to the currently selected
link.
<li><a aria-current="true" title="selected" class="selected">Menu item</a></li>
I believe only Jaws 18 has aria-current support yet, bt we should see
that support increase quickly over the next couple of months.
With this bckup, usingaria-current will not degrade the experience of
non-supporting user agents, so you can totally do it.
Again aria-selected is not valid with links, only with radio buttons,
options in a dropdown, tabs or grid cells.
Check the ARIA 1.1 section for aria-selected and see the roles and
inherited roles sections in the table for a list of roles that can be
used with aria-selected.
For any role not litsd there, browsers and assistive technologies are
instructed to ignore the use of aria-selected, and ARIA aware
accessibility testing tools will flag its presence on those elements
as an error.



On 3/6/17, Preast, Vanessa < <EMAIL REMOVED> > wrote:
> Thank you to both Jonathan and Patrick!
>
> Best,
> Vanessa
>
> -----Original Message-----
> From: WebAIM-Forum [mailto: <EMAIL REMOVED> ] On Behalf
> Of Patrick H. Lauke
> Sent: Monday, March 06, 2017 9:16 AM
> To: <EMAIL REMOVED>
> Subject: Re: [WebAIM] Using ARIA for styling?
>
> On 06/03/2017 15:13, Patrick H. Lauke wrote:
> [...]
>> That's an excellent idea not only because it saves you having to also
>> add/remove an extra class for styling,
> [...]
>
> and in my haste to reply to the CSS part I actually overlooked the fact that
> yes, as Jonathan points out, aria-selected isn't quite what you want. But
> the CSS part of my advice remains valid, adapted to the correct ARIA of
> course...
>
> P
> --
> Patrick H. Lauke
>
> www.splintered.co.uk | https://github.com/patrickhlauke
> http://flickr.com/photos/redux/ | http://redux.deviantart.com
> twitter: @patrick_h_lauke | skype: patrick_h_lauke
> > > http://webaim.org/discussion/archives
> > > > > >


--
Work hard. Have fun. Make history.