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

[whatwg] LABEL and radio/checkbox onclick

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 17 Aug 2004 22:03:58 +0000 (UTC)
Message-ID: <Pine.LNX.4.61.0408172203330.22355@dhalsim.dreamhost.com>
On Sun, 18 Jul 2004, Hallvord Reiar Michaelsen Steen wrote:
> 
> It is AFAIK not covered by any spec whether clicking a LABEL should 
> trigger an onClick event on the associated control. Implementations have 
> been inconsistent. IMO the most useful implementation is that clicking a 
> label should trigger onClick for form controls - at least for those that 
> change state (such as a checkbox).

Hmm, yes. This is platform-dependent, though. Added:

  <p>The <code>label</code> element's exact default behaviour must
  match the platform's label behaviour. For example. on platforms
  where clicking a checkbox label checks the checkbox, clicking a
  <code>label</code> element must cause a <code>click</code> event to
  be synthesised and fired at the checkbox.</p>

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 17 August 2004 15:03:58 UTC

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