W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2004

[whatwg] Label question

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 30 Jun 2004 12:22:16 +0000 (UTC)
Message-ID: <Pine.LNX.4.58.0406301220540.27872@dhalsim.dreamhost.com>
On Mon, 28 Jun 2004, martijnw wrote:
>
> Not sure if this is an issue in the Web Forms 2.0 Working Draft, but is
> something like this allowed?
>
> <label for="dat" id="dit">dat</label><label for="dit" id="dat">dit</label>

As I think someone else pointed out, this is already disallowed by HTML4.

WF2 says:

# For labels pointing (via for) to elements that are not form controls
#   The attribute must be ignored. It will appear in the DOM (including as
#   the value of htmlFor) but the control DOM attribute must return null and
#   activating the label must not send focus to the associated element.
 - http://whatwg.org/specs/web-forms/current-work/#handling

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 30 June 2004 05:22:16 UTC

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