[thelist] drop down date choosers and labels for accessibility

Austin Harris austin at dotmail.co.uk
Fri Jan 5 08:21:08 CST 2007

A bit of a conundrum here;

I have a fieldset with various form elements in one of which being a set of three dropdowns for the date. The issue is how to provide the suitable labels for day, month and year AND for all three. I don't really want to have to write "birthday - day" "birthday - month" & "birthday - year". (This will get worse when using for a date that is for something like "insurance start date" etc.)

In theory I should put all of them in a fieldset and make the legend the title for the date but I am not sure that this is right, (ie having nested fieldsets - feels a bit 90's tables to me!).

If you make it seperate fieldsets then the date isn't really part of the fieldset, (which could easily be soemthing like personal details.)

What I currently have is this;

<fieldset class="first">

<legend>Title of first fieldset</legend>

...some other bits of form in here...

<p>Date chooser</p>
<select id="dateDD" class="dropdownList2">
	<option value="1">01</option>
	<option value="2">02</option>
<select id="dateMM" class="dropdownList2">
	<option value="1">01</option>
	<option value="2">02</option>
<select id="dateYYYY" class="dropdownList4">
	<option value="1">2001</option>
	<option value="2">2002</option>
<label for="dateDD" class="labelDate">Day</label>
<label for="dateMM" class="labelDate">Month</label>
<label for="dateYYYY" class="labelDate">Year</label>


Any ideas or pointers?

It's something that has been on my mind for some time, (I seem to be constantly doing forms with dates in!)


More information about the thelist mailing list