W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > April to June 2012

(wrong string) ‚€œaria-labelledby‚€ on already labeled input elements?

From: Steve Faulkner <faulkner.steve@gmail.com>
Date: Fri, 22 Jun 2012 13:03:14 +0100
Message-ID: <CA+ri+VmX_Z1Lx6ZM0mh7oG=dCppp6wog904sbd7NcBvSLDTr-g@mail.gmail.com>
To: Ian Yang <ian.html@gmail.com>
Cc: w3c-wai-ig@w3.org
Hi Ian,
there is no need as you have said, the programmatic association is provided
via the label for/id

aria-labelledby can be useful when you have mutiple sources for a label:

example: http://www.html5accessibility.com/tests/mulitple-labels.html

regards
Stevef

On 22 June 2012 12:52, Ian Yang <ian.html@gmail.com> wrote:

> Hi everyone,
>
> I have seen many ARIA tutorial websites use codes such as the following
> one:
>
>> <label for="name" id="label-name">Your Name</label>
>>
>> <input  id="name" aria-labelledby="label-name" type="text">
>>
>>
> Since the input element has already been labeled by the label element
> which is using for attribute, I'm wondering what the purpose of using
> aria-labelledby attribute is in the above case.
>
> I'm pretty new to ARIA, so am hoping that someone could clear up my
> confusion. Thanks in advance.
>
>
> Kind Regards,
> Ian Yang
>



-- 
with regards

Steve Faulkner
Technical Director - TPG

www.paciellogroup.com | www.HTML5accessibility.com |
www.twitter.com/stevefaulkner
HTML5: Techniques for providing useful text alternatives -
dev.w3.org/html5/alt-techniques/
Web Accessibility Toolbar - www.paciellogroup.com/resources/wat-ie-about.html
Received on Friday, 22 June 2012 12:04:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 12:04:24 GMT