[whatwg] LABEL and radio/checkbox onclick

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