W3C home > Mailing lists > Public > public-html@w3.org > August 2007

The <label>

From: Craig Francis <craig@synergycms.com>
Date: Sat, 4 Aug 2007 18:50:54 +0100
Message-Id: <ED949255-016F-465A-A09E-3DB16F9EFE35@synergycms.com>
To: public-html <public-html@w3.org>

I might be a little early on the discussion here, as it seems the  
spec is missing this part, in regards to the <label> tag:


Where it states "See WF2 for now" (Web Forms 2.0).

Anyway, I have recently been working on a website where the fields  
(radio) were presented in a tabular layout... its one of those "rate  
out of 5" types where the thing to be rated is set per row, and the  
columns are the radio fields 1 to 5.

Technically its possible to have used a drop down menu (select),  
however we had a design to match.

While developing it, I was hoping to have the headers effectively be  
the labels, instead of having to write out an off-screened label for  
each field.

I know its technically possible (although current screen readers  
don't really support it), to give an input field multiple labels...  
which was one part to the problem... however in HTML4 "the for  
attribute associates a label with another control explicitly"... so I  
could not assign the label to multiple input fields.


What I am proposing is that the @for attribute can take multiple,  
space separated, id's to list the related fields... in the same was  
that the @class attribute can take multiple CSS classes.


Also, on perhaps an un-related note... I am not too keen on the use of:

<label>Name <input... /></label>

I know this is implicit linking of the field to the label, without  
the need for the @for attribute... but I was under the impression  
that xml cascades the meaning down to child nodes, so does this imply  
that the <input>, a field, is also a label?

For me it just seems like a hack to increase the hit area in visual  

Received on Saturday, 4 August 2007 17:51:14 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:25 UTC