[whatwg] LABEL and radio/checkbox onclick

Matthew Raymond mattraymond at earthlink.net
Wed Aug 18 06:16:26 PDT 2004

Ian Hickson wrote:
> 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>

    There are a few problems with this:

1) When HTML 4.01 markup is transferred to a WF2 document, the <label> 
behavior changes for the same markup with absolutely NO WAY TO RECOVER 

2) The webmaster cannot reliably predict the behavior of <label> on a 
platform without extensive knowledge of that platform. Therefore, if the 
webmaster is targeting a specific set of operating systems and browsers, 
he must have knowledge of how the native UI handles labels for each 
control he uses, rather than simply depending on the HTML 4.01 specified 

3) You're providing no method of detecting whether input is passed to 
the associated control. Therefore, is there not a risk of multiple 
events being fired at the control when Javascript is introduced to make 
up for the lack of event passing on some platforms?

4) There's absolutely no way to know how <label> should behave when 
associated with an <object> element.

    Please see the following message for what I believe to be a better 


More information about the whatwg mailing list