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

[whatwg] [WF2] Label with empty for attribute

From: Ian Hickson <ian@hixie.ch>
Date: Mon, 14 Aug 2006 09:24:44 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0608140920500.5340@dhalsim.dreamhost.com>
On Fri, 20 Jan 2006, Simon Pieters wrote:
> 
> 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?

For compat with IE, I've specced that it should ignore the attribute if 
it's empty.


On Sat, 21 Jan 2006, Anne van Kesteren wrote:
> 
> I think "for" should be treated analogously to "form". That would mean 
> that the <label> element is not associated with any control.

Back compat wins this one I think.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 14 August 2006 02:24:44 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:28 UTC