[whatwg] LABEL and radio/checkbox onclick

Hallvord Reiar Michaelsen Steen hallvors at online.no
Sun Jul 18 05:06:25 PDT 2004


Something WF2 might be a good place to clarify..

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).

One (not purpose-written) TC:
http://www.hallvord.com/opera/rqa.php
Older versions of Opera would not enable the "SELECT multiple" if one 
clicked the text next to the first checkbox instead of the checkbox 
itself.

(If anyone feels tempted to actually use that page for anything note 
that it doesn't handle HTTP/1.1 logs well, only 1.0.)



More information about the whatwg mailing list