WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: RE: Labeling form elements for date

for

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

From: Terence de Giere
Date: Thu, Jun 27 2002 2:43PM
Subject: RE: Labeling form elements for date
No previous message | No next message

The LABEL element may not be nested as in the example:

<label for="month"><label for="day"><label for="year">Select the
date:</label></label><label>

One may however nest the related INPUT within a single LABEL element
which creates an implicit association of a LABEL with a forn control:

<label for="month">Month:
<input id="month" name="month" type="text" size="2" maxlength="2" >
</label>

Note that older assistive technology does not support the explicit
association provided by the "for" attribute, and placing the LABEL text
immediately before the associated form control is the best way to make
sure a user will understand they go together. If the LABEL element