E-mail List Archives

RE: Form Labels

for

From: Andrew Johns
Date: Sep 30, 2002 8:20AM


In my experience, I've achieved accessibility in this situation by using the fieldset tag, to group the 3 elements together under the heading "Date" and then use label on the individual drop downs, for example:

<fieldset>
<legend>Date</legend>
<label for="day">Day:</label><input type="text" name="day" id="day">
<label for="day">Month:</label><input type="text" name="month" id="month">
<label for="day">Year:</label><input type="text" name="year" id="year">
</fieldset>


Then I'd use styles to style it appropriately, e.g. to make the legend appear more like the rest of the form labels, and to hide the unwanted labels (day,month,year) from browsers that support CSS.

This example isn't always acceptable, though, as it depends heavily on the design requirements and whether clients are willing to accept that it won't look consistent (mainly the issue is with using CSS on the fieldset/legend) in each browser, but AFAIK, it IS the appropriate way to make it accessible.


Regards,

Andy




-----Original Message-----
From: Ali Naito [mailto: <EMAIL REMOVED> ]
Sent: 30 September 2002 15:50
To: <EMAIL REMOVED>
Subject: Form Labels


Hi everyone,

How do I tackle form labels on a date field. Example:
http://www.bila.net/bowl/testform.html Can I use the same ID for all three
menus? Do I have to split it up into three elements?

- Ali Naito


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


_____________________________________________________________________
VirusChecked by the Incepta Group plc
_____________________________________________________________________


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