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