WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: using "label for=" on things other than inputs

for

From: Jonathan Avila
Date: Feb 22, 2016 11:27AM


> I take it nobody would see a failure of 1.3.1 for using 'label for=' on read-only text, disabled input, or a button that already has an accessible name via value - correct?

In the case that the label would override the button text and provide a different accessible name a violation could occur if that new accessible name did not sufficiently label the button. For example, a button with text color had a label of "foreground". Foreground would be the accessible name unless the button was wrapped within the label such as in <label for="a1"> Foreground <button id="a1">Color</button></label>.

Jonathan

Jonathan Avila
Chief Accessibility Officer
SSB BART Group
<EMAIL REMOVED>
703.637.8957 (o)
Follow us: Facebook | Twitter | LinkedIn | Blog | Newsletter


-----Original Message-----
From: WebAIM-Forum [mailto: <EMAIL REMOVED> ] On Behalf Of Detlev Fischer
Sent: Saturday, February 20, 2016 7:42 AM
To: WebAIM Discussion List
Subject: Re: [WebAIM] using "label for=" on things other than inputs

All this doesn't quite answer my original question whether the use of label on elements other than those Steve listed could be confusing and should be discouraged. I take it nobody would see a failure of 1.3.1 for using 'label for=' on read-only text, disabled input, or a button that already has an accessible name via value - correct?

Sent from phone

> On 20 Feb 2016, at 09:37, Steve Faulkner < <EMAIL REMOVED> > wrote:
>
> On 20 February 2016 at 01:42, Jonathan Avila
> < <EMAIL REMOVED> >
> wrote:
>
>> HTML Accessibility API Mappings 1.0<
>> https://www.w3.org/TR/html-aam-1.0/#button-element> also indicates
>> the following which does not seem to include the label element:
>
> Yes you are correct that this is was the API spec currently says, that
> is my fault.
>
> I have filed an issue https://github.com/w3c/aria/issues/259
>
> --
>
> Regards
>
> SteveF
> Current Standards Work @W3C
> <http://www.paciellogroup.com/blog/2015/03/current-standards-work-at-w
> 3c/> > > archives at http://webaim.org/discussion/archives
>