Re: [w3c-wai-ig] <none>

Hi Tom,

From the Understanding document:
"The intent of this Success Criterion is to ensure that the words which
visually label a component are also the words associated with the component
programmatically. This helps ensure that people with disabilities can rely
on visible labels as a means to interact with the components."

Effectively, the best way to think about this SC is to think of the initial
motivator for it being added to WCAG: users who need speech as a mode of
input. So what this is asking for here is that the "name" of the
control/widget (button or similar) that is visible on screen is also part
of the "accessible name", so that when a user says "Focus: I'm feeling
lucky", the speech-to-text device knows which button you mean (because the
'accessible name' is also part of, or all of, the visible on-screen name).
This is most often an issue when the 'interactive' control is a graphic (or
other non-text element) of some sort - which means the alt text is often
the accessible name.

In the use-case you have described, you should have no issue: <label
for="FN">First name</label><input type="text" id="FN"> will pass 2.5.3
Label in Name <https://www.w3.org/TR/WCAG21/#label-in-name> with no concern.

HTH

JF

On Tue, Jun 14, 2022 at 8:12 AM Tom Shaw <Tom-Shaw@hotmail.com> wrote:

> Hi.
>
> I'm looking for some feedback on an issue possibly relating to WCAG 2.1
> Label in Name.
>
> So we have a text input with the label 'First Name'
>
> The label has not been programmatically associated with the text input
> using the appropriate attribute/ID (a few other failures here) BUT there is
> a visible label. Will this also fail Label in Name? I think it does..."For
>  user interface components
> <https://www.w3.org/TR/WCAG21/#dfn-user-interface-components> with labels
> <https://www.w3.org/TR/WCAG21/#dfn-labels> that include text
> <https://www.w3.org/TR/WCAG21/#dfn-text> or images of text
> <https://www.w3.org/TR/WCAG21/#dfn-images-of-text>, the name
> <https://www.w3.org/TR/WCAG21/#dfn-name> contains the text that is
> presented visually."
>
> Thanks
>
> Tom
>
> Sent from Outlook <http://aka.ms/weboutlook>
>


-- 
*John Foliot* |
Senior Industry Specialist, Digital Accessibility |
W3C Accessibility Standards Contributor |

"I made this so long because I did not have time to make it shorter." -
Pascal "links go places, buttons do things"

Received on Tuesday, 14 June 2022 13:10:11 UTC