WebAIM - Web Accessibility In Mind

E-mail List Archives

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

for

From: Jonathan Avila
Date: Feb 23, 2016 7:56AM


> my interest is in whether what is defined in the spec for UA implementations is actually implemented and what effect it has on the accessible name calculation.

So should this then logically flow to allow labeling for ARIA equivalents to buttons and input elements such as role button, role radio, and role checkbox.
<span id="r1" role="radio" ...> ...</span><label for="r1">Milk</label>

In the past this was not considered allowable -- but perhaps this is changing.

Jonathan Avila


-----Original Message-----
From: WebAIM-Forum [mailto: <EMAIL REMOVED> ] On Behalf Of Steve Faulkner
Sent: Tuesday, February 23, 2016 9:51 AM
To: WebAIM Discussion List
Subject: Re: [WebAIM] using "label for=" on things other than inputs

On 23 February 2016 at 14:43, Sailesh Panchang < <EMAIL REMOVED> >
wrote:

> The HTML5 specs also say, "button element represents a button labeled
> by its contents".
> So is there a need for one to use a label element to label a button
> really given other AT-supported methods to label a button / push
> button type input element are available?
>

Hi Sailesh, I am not and have not argued that using a label is either necessary or recommended.

my interest is in whether what is defined in the spec for UA implementations is actually implemented and what effect it has on the accessible name calculation.

As stated previously, what i found in some quick testing is that use of label on a button indeed results in the label text being used for the button accessible name.

--

Regards

SteveF
Current Standards Work @W3C
<http://www.paciellogroup.com/blog/2015/03/current-standards-work-at-w3c/>;