WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: RE: using table headers as form labels

for

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

From: julian.rickards
Date: Wed, Oct 08 2003 3:33PM
Subject: RE: using table headers as form labels
No previous message | Next message →

I don't know if this relates to the original question but I am in the
process of creating a form with text inputs, select lists and checkboxes.
However, I am using a CSS-based layout. I am using <label> with the for
attribute to relate the label to the input. Unfortunately, it failed in on
instance and I have no idea how to resolve it.

The form is for entry of a record into a database. The records are news
releases from mining companies and the date recorded should be the date of
the release of the news release, not necessarily the date of data entry. For
that reason, I have three select lists, one for day, one for month and one
for year. I felt I needed only one label "Select date of News Release" to
explain the purpose of the three fields but I don't think I can use three
for attributes in the label so that all three inputs are related to the same
label or on the other hand, I don't think I can use the same id three times
so that the single for attribute applies to all three inputs. I felt that I
did not need to label each list because the year is the full year (4d-g-ts)
and the month is the month name: neither of which could be confused with the
day number.

My rambling went a bit off topic, sorry - back on track. By not using tables
for layout, I am able to avoid the table headers issue. My primary testing
browser is Opera (currently 7.2) which supports display: table-cell.
Probably, Mozilla/Netscape and Safari/Konqueror support it too but
unfortunately, my work place is an IE-based one. If and when IE supports
this display property, it will make life much easier - table-like layouts
could be easily created without using <table> code.

---------------------------------------------------------
Julian Rickards
Digital Publications Distribution Coordinator
Publications Services Section
Ontario Ministry of Northern Development and Mines
Phone: (705) 670-5608
Fax: (705) 670-5690


>

From: Randy Pearson
Date: Thu, Oct 09 2003 7:01AM
Subject: RE: using table headers as form labels
← Previous message | No next message

>> ... I have three select lists, one for day, one for month and one
for year. I felt I needed only one label "Select date of News Release" to
explain the purpose of the three fields ...

It seemed that, perhaps, grouping the 3 in a <fieldset>, and using the
<legend> to describe the set, could possibly be of use. But I cannot find
any way to style this in a way so that the <legend> could line up with the
labels on your other fields. It would be nice if, instead the ID of the
<fieldset> (with no legend) could be used as the target of the FOR of the
<label>, but I doubt assistive technologies make this interpretation. So,
although one of my references talks about <fieldset> as being a benefit to
accessibility, it seems just to miss the mark here.



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