WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: labeling question

for

From: Jukka K. Korpela
Date: May 29, 2008 11:20AM


Nancy Johnson wrote:

> In our web form we have several instances there there is one
> description associated with 3 select boxes.
> How do you label for this scenario?

I don't. I change the association or the entire approach.

> Example: the name of the form control is Date of Manufacture: Then
> there are 3 select boxes associated with Date of Manufacture, The
> first one is Month, the second one is Day and the Third is Year.

The boxes should clearly be associated with words for month, day, and
year, e.g. (assuming users are primarily in the US and hence accustomed
to this order):

<fieldset>
<legend>Date of manufacture</legend>
<div><label for="month">Month:</label>
<select id="month" ...>...</select></div>
(similarly for day and year)
</fields>

But it's better to make the date entry a single text input field, with a
label like
"Enter date of manufacture, in numeric month/day/year notation:"

Of course, the server-side script (and, optionally, a client-side
pre-check, too) should verify that the date is well-formed and prompt
for it again if it is not.

Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/