WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: WCAG 2.1 2.5.3 Label in name

for

From: Steve Green
Date: Oct 1, 2019 9:01AM


It's pretty well described at https://www.w3.org/WAI/WCAG21/Understanding/label-in-name.html#accessible-name-and-description-computation-specification

The first thing is to work out what the accessible name is. If your code is something like "Learn more <span class="hidden">about sausages</span>", the accessible name will be "Learn more about sausages".

It must be possible to obtain the visible label by removing zero or more characters from the start and end of the accessible name. So "more about sausages" would be fine, as would "more", but "more sausages" or "pork sausages" would not.

Steve


-----Original Message-----
From: WebAIM-Forum < <EMAIL REMOVED> > On Behalf Of Jon Brundage via WebAIM-Forum
Sent: 01 October 2019 15:30
To: WebAIM Discussion List < <EMAIL REMOVED> >
Cc: Jon Brundage < <EMAIL REMOVED> >
Subject: Re: [WebAIM] WCAG 2.1 2.5.3 Label in name

Thanks Steve- could you cite an example of "exact substring of the accessible name as computed by the accessible name computation algorithm"?

Jon

-----Original Message-----
From: Steve Green
Sent: Tuesday, October 01, 2019 10:16 AM
To: WebAIM Discussion List
Subject: Re: [WebAIM] WCAG 2.1 2.5.3 Label in name

You can still use that technique as long as the visible label is an exact substring of the accessible name as computed by the accessible name computation algorithm.

Steve Green
Managing Director
Test Partners Ltd


-----Original Message-----
From: WebAIM-Forum < <EMAIL REMOVED> > On Behalf Of Jon Brundage via WebAIM-Forum
Sent: 01 October 2019 15:13
To: <EMAIL REMOVED>
Cc: Jon Brundage < <EMAIL REMOVED> >
Subject: [WebAIM] WCAG 2.1 2.5.3 Label in name

Hello-

Our organization has used hidden text to expand links that need more context than what is displayed visually.

For example, where multiple ???learn more??? links appear on a page we will expand them- the visual is ???learn more??? but we make them unique and meaningful by adding ???about (subject)??? with hidden text. Or if an image button is used the ALT text is expanded ???ALT=???learn more about (subject)???

Under WCAG 2.1 2.5.3 ???Label in Name??? is this technique no longer acceptable? Due to the need to identify links with voice dictation, must the full link text now appear visually? The extra space needed to expand all links visually is a design constraint that we would like to avoid if possible.

thanks

Jon