WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Implementing aria-label

for

From: Birkir R. Gunnarsson
Date: Sep 16, 2016 7:58AM


aria-label does not work consistently un elements with no ARIA role.
What you can do,, and it is a bit of a hack, is to give it a role,
e.g. role="img", or give it a tabindex of 0 and role="button" (with
aria-disabled="true").
It is a hack, I know, but it should get the aria-label spoken by all
screen readers.
What about hiding the actual text with aria-hidden="true" and
replacing it with screen reader only text?
If it is a live region, I think you will need the good old JavaScript.
If you can give more specifics on the problem we can get more creative
(or hopefully less creative).

It's a hack, notwhat the

On 9/16/16, Jamous, JP < <EMAIL REMOVED> > wrote:
> Morning Folks,
>
> I wanted to check with those who have robust ARIA background before I try to
> figure out a way for this.
>
> I have a situation where aria-label or a message to the screen reader should
> be provided. This message must fire when the screen reader obtains focus on
> a p or span tag.
>
> I know what you are thinking. Did you have enough coffee in you this morning
> JP? Yes, I have, but this is one of those goofy situations that we all
> dislike.
>
> I am unable to use keyboard focusable objects due to precious page space.
> Also, the message will have to be repeated multiple times on the page. It
> can range between 1 to 15 times.
>
> As I used aria-label in a span tag, VoiceOver read it. However, this fails
> for both JAWS and NVDA. So the goal is to make them speak this message as
> VoiceOver is speaking the aria-label in a span tag.
>
> If it can be done through aria-attribute, that will be great. If not, I may
> have to add a JS function.
>
>
>
>
> **************************************************
>
> Jean-Pierre Jamous
> Digital Accessibility Specialist & Developer
> UI Accessibility Team
>
> SME for EBN Include
> Digital Accessibility Specialist & Blind and Visually Impaired Expert
>
> The only limitations in life are those we set for ourselves
>
> **************************************************
>
>
> > > > >


--
Work hard. Have fun. Make history.