[whatwg] [WF2] Label with empty for attribute

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
<http://annevankesteren.nl/>

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