W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2006

[whatwg] [WF2] Label with empty for attribute

From: Anne van Kesteren <fora@annevankesteren.nl>
Date: Sat, 21 Jan 2006 11:40:59 +0100
Message-ID: <20060121114059.be5e59txpiscscsg@webmail.annevankesteren.nl>
Quoting Simon Pieters <zcorpan at hotmail.com>:
> It is not defined what should happen when a label has an empty for="" 
> attribute. Consider the following example:
>   <label for="">foo<input></label>
> Is the label element part of the .labels DOM attribute for the input? 
> What should the label's .control DOM attribute return?

I think "for" should be treated analogously to "form". That would mean 
that the
<label> element is not associated with any control.

However, currently the specification states that for labels that point to
elements that are not form controls the "for" attribute must be ignored. Which
would imply that descendents can get focus...

Anne van Kesteren
Received on Saturday, 21 January 2006 02:40:59 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:44 UTC