WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: Label tags again

for

Number of posts in this thread: 4 (In chronological order)

From: Ken Weavers
Date: Fri, Jul 16 2010 9:51AM
Subject: Label tags again
No previous message | Next message →

Following the very helpful responses from my question about Label tags on
June 22, I have discovered that the cursor goes to the field if you click on
the Label, provided it is coded correctly - thanks especially Jason
Megginson.

Could I just check if there are any other advantages of the Label tag? I set
up two fields, one with a Label tag, one without, and as expected only the
former caused focus to move to the field. But I was surprised that the
assistive software spoke the words of the descriptor in both cases in the
same way, whether there was a Label tag or not. So this does not appear to
be an advantage, though not a disadvantage either, obviously.

If there are any other major advantages, I would like to check that the
web-page takes those advantages, to confirm that the coding of the tags is
optimum.

Thanks,

Ken Weavers, Oxford Brookes University.

From: Patrick H. Lauke
Date: Fri, Jul 16 2010 10:03AM
Subject: Re: Label tags again
← Previous message | Next message →

On 16/07/2010 16:51, Ken Weavers wrote:
> Could I just check if there are any other advantages of the Label tag? I set
> up two fields, one with a Label tag, one without, and as expected only the
> former caused focus to move to the field. But I was surprised that the
> assistive software spoke the words of the descriptor in both cases in the
> same way, whether there was a Label tag or not.

When there's no explicit label, screenreaders/AT will use heuristics and
in most cases read the text that's directly preceding an input/control.
In some situations (if your text isn't directly adjacent to the input in
your markup - maybe you're doing extra stuff like a help link at the end
of the text or similar) this can fall flat on its face.

In general, it's better (to avoid any potential problems, or different
heuristics coded into the different SRs/ATs) to just go with explicit
labels.

> So this does not appear to
> be an advantage, though not a disadvantage either, obviously.
>
> If there are any other major advantages, I would like to check that the
> web-page takes those advantages, to confirm that the coding of the tags is
> optimum.


P
--
Patrick H. Lauke

From: E.J. Zufelt
Date: Fri, Jul 16 2010 10:06AM
Subject: Re: Label tags again
← Previous message | Next message →

Good afternoon Ken,

You said: "the
assistive software spoke the words of the descriptor in both cases".

Curious what you mean by assistive software. It is true that some screen-readers will guess at what text to use for the form field label, and depending on how the information is displayed it will get it right. The advantage is that screen-readers are not required to guess about form field labels if you explicitly specify a label using the label element.

HTH,"
Everett Zufelt
http://zufelt.ca

Follow me on Twitter
http://twitter.com/ezufelt

View my LinkedIn Profile
http://www.linkedin.com/in/ezufelt



On 2010-07-16, at 11:51 AM, Ken Weavers wrote:

> Following the very helpful responses from my question about Label tags on
> June 22, I have discovered that the cursor goes to the field if you click on
> the Label, provided it is coded correctly - thanks especially Jason
> Megginson.
>
> Could I just check if there are any other advantages of the Label tag? I set
> up two fields, one with a Label tag, one without, and as expected only the
> former caused focus to move to the field. But I was surprised that the
> assistive software spoke the words of the descriptor in both cases in the
> same way, whether there was a Label tag or not. So this does not appear to
> be an advantage, though not a disadvantage either, obviously.
>
> If there are any other major advantages, I would like to check that the
> web-page takes those advantages, to confirm that the coding of the tags is
> optimum.
>
> Thanks,
>
> Ken Weavers, Oxford Brookes University.
>

From: Barker.Diane
Date: Fri, Jul 16 2010 10:09AM
Subject: Re: Label tags again
← Previous message | No next message

In regard to this: "But I was surprised that the assistive software
spoke the words of the descriptor in both cases in the same way, whether
there was a Label tag or not."

What you've stated is true, however, when JAWS is in forms mode the
input field without a label tag will not be read to the user when the
user arrives at that input, therefore, making it inaccessible.

Regards,
Diane

-----Original Message-----
From: = EMAIL ADDRESS REMOVED =
[mailto: = EMAIL ADDRESS REMOVED = ] On Behalf Of Ken Weavers
Sent: Friday, July 16, 2010 8:51 AM
To: = EMAIL ADDRESS REMOVED =
Subject: [WebAIM] Label tags again

Following the very helpful responses from my question about Label tags
on
June 22, I have discovered that the cursor goes to the field if you
click on
the Label, provided it is coded correctly - thanks especially Jason
Megginson.

Could I just check if there are any other advantages of the Label tag? I
set
up two fields, one with a Label tag, one without, and as expected only
the
former caused focus to move to the field. But I was surprised that the
assistive software spoke the words of the descriptor in both cases in
the
same way, whether there was a Label tag or not. So this does not appear
to
be an advantage, though not a disadvantage either, obviously.

If there are any other major advantages, I would like to check that the
web-page takes those advantages, to confirm that the coding of the tags
is
optimum.

Thanks,

Ken Weavers, Oxford Brookes University.