RE: label tag and multiple associations

Hi,

Would thie following be of any use?

<LABEL>
   Area code: <INPUT type="text" name="areacode"><br>
   Number: <INPUT type="text" name="areacode">
</LABEL>

(Aside from breaking the "Each LABEL element is associated with exactly one
form control." rule)

Cheers,
Dave.

> -----Original Message-----
> From: Charles McCathieNevile [mailto:charles@sidar.org]
> Sent: 26 November 2003 07:47
> To: Kieran_M_O'Brien@national.com.au
> Cc: w3c-wai-ig@w3.org
> Subject: Re: label tag and multiple associations 
> 
> 
> 
> Hi Kieran,
> 
> in HTML you can't do this in the general case. The closest 
> approach is 
> to use the fieldseet and legend elements which are designed to do 
> something like this. See 
> http://www.w3.org/TR/html4/interact/forms.html#h-17.9 for 
> where it says 
> "Each LABEL element is associated with exactly one form control." and 
> see http://www.w3.org/TR/html4/interact/forms.html#h-17.10 
> for fieldset 
> and legend, which do what you are looking for.
> 
> There is a little hack that is often used of putting things 
> in a table, 
> where you can associate one cell with a number of others. A 
> handful of 
> screen readers present this information as if it were achieving your 
> goal here. But you don't have a formal way of saying that the label 
> applies to the form controls in particular, which is the checkpoint 
> requirement as I understand it. In particular, unlie with 
> fieldset/legend you have to do some nasty hacking to get an 
> accesskey...
> 
> just my 2cents (Australian official value)
> 
> Chaals
> 
> On Wednesday, Nov 26, 2003, at 15:24 Japan, 
> Kieran_M_O'Brien@national.com.au wrote:
> 
> >
> > Greetings,
> >
> > How do I associate more than one input field with one label ?? For 
> > example,
> > let's say I have a Telephone number field but have two 
> boxes, i.e. one 
> > for
> > the area code and one for the actual number. Ignoring the 
> fact that I 
> > could
> > have an area code label, is there a way of associating 
> these two input
> > boxes with the one label ?? Please don't question why I 
> have done it 
> > this
> > way, or that I should redo it this way. I'm not interested in 
> > workarounds.
> > Just wondering if it is possible. Then I can go back to 
> them to tell 
> > them
> > that they have to change it. Thanks in advance.
> >
> 

Received on Wednesday, 26 November 2003 10:06:44 UTC