WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Best practices for identifying forms and their fields

for

From: Denis Boudreau
Date: May 6, 2013 12:07PM


Hey guys,

I think it would be advisable to point out that for improved consistency and support with assistive technologies and user agents, relying on the aria-label attribute rather than the title attribute would be a good idea. Going back to your logic, this would translate as:

- If there's a label with text, show it
- If not, and there's an aria-label attribute, show it, but suggest that there should be a visible label (if that's workable)
- If not, and there's a title attribute, show it, but suggest that there should be either an aria-label attribute or a visible label (if that's workable)
- If there's neither, show label, aria-label and title as missing, suggesting that a visible label should be used (if that's workable)

Just a thought.

/Denis



On 2013-05-06, at 1:58 PM, Jared Smith < <EMAIL REMOVED> > wrote:

> On Mon, May 6, 2013 at 11:09 AM, Dave Merrill wrote:
>
>> You're saying that a field's title WILL be read if no label is present, as
>> in your search box example, right?
>
> Correct.
>
>> If so, then in the context of an
>> accessibility review tool in a CMS, the logic would be:
>> - If there's a label with text, show it
>> - If not, and there's a title, show it, but suggest that there should be a
>> label if that's workable
>> - If there's neither, show both label and title as missing, suggesting that
>> lable should be used if that's workable
>
> Looks good to me. If there is visible label text, it should be
> associated to the control. If not, then a title attribute can be used
> to describe the control. If neither, then the function of the control
> will be ambiguous.
>
> Jared
> > >