WebAIM - Web Accessibility In Mind

E-mail List Archives

<label> element

for

From: Leo Smith
Date: Apr 3, 2002 7:12AM


I did some testing on this with JAWS 4.0 with IE 5.5 on Win 2000.

I found out the following:

If the contents of a <label> element is a graphic with appropriate alt
text, JAWS does not seem to explicitly associate the <label>
element's contents (ie, the alt text) with the form control, whether
the label element is inside the <form> tags or not.

A <label> element containing textual content is explicitly
associated with its form control when located inside the <form>
tags. I did not have a chance to test this outside the <form> tags.

Also, I noticed that JAWS does not seem to read title attributes on
<select> elements. Using the title attribute for form controls has
been suggested as one way of meeting the 508 accessible forms
requirement (using <label> is not the only way of meeting the
requirement, again something that Bobby seems to be unaware of).
For <input type="text"> elements, the title attribute is explicitly
associated with the form control just fine.

If anyone has HPR to test this stuff, I would be interested to hear
the outcomes.

Leo.

On 1 Apr 2002, at 16:43, Leo Smith wrote:

> Well, on one of my pages the form element's label is adjacent to it
> (directly above), but in this instance the <form> tags cannot
> encapsulate both the <label> and the form element:
>
> <.tr valign="top">
> <.td width="100%">
> <.label for="quicklinks"><.img src="/images/title_quicklinks.gif"
> width="165" height="25" border="0" alt="quick links"><./label>
> <./td>
> <./tr>
> <.tr valign="top">
> <.td width="100%">
> <.form method="post" action="/cgi-bin/go-url.cgi">
> <.select name="URL" class="homequicklinks"
> id="quicklinks">
> <.option value="something">something</option>
> <./select>
> <.input type="image" border="0"
> src="/images/button_go_quicklinks.gif" width="19" height="19"
> alt="go">
> <./form>
> <./td>
> <./tr>
>
> Is a screen reader not going to associate the label with the form
> element in this instance?
>
> Leo.
>
>
> On 1 Apr 2002, at 11:13, Kevin Spruill wrote:
>
> > Seems pretty straightforward either way - labels (logically) should
> > be placed with the form elements they refer to... within the form.
> > As for interpretation of the statue... how about this:
>
>
>
> Leo Smith
> Web Designer/Developer
> USM Office of Publications and Marketing
> University of Southern Maine
> 207-780-4774
>
>
> ----
> To subscribe, unsubscribe, or view list archives,
> visit http://www.webaim.org/discussion/
>



Leo Smith
Web Designer/Developer
USM Office of Publications and Marketing
University of Southern Maine
207-780-4774


----
To subscribe, unsubscribe, or view list archives,
visit http://www.webaim.org/discussion/