How to markup a "Select"-group
every time I have to markup date input-fields in a form, I'm faced with the same question: "What's the best way to bind a label to a group of select-elements?"
'Cause basically you have this:
Most of the time I hide the month-day-year labels using CSS, and only show the first label, but what should go in the "for"-attribute of that label?
<label>Your date of birth:</label>
<select id="month"><!-- 12 Option-elements here please --></select>
<select id="day"><!-- lots of Option-element go here --></select>
<select id="year"><!-- lots of Option-elements go here --></select>
What's semantic and accessible?