[whatwg] LABEL and radio/checkbox onclick

Mikko Rantalainen mira at cc.jyu.fi
Sun Jul 18 17:25:34 PDT 2004

Matthew Thomas / 2004-07-18 16:25:

> On 19 Jul, 2004, at 12:06 AM, 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
> In non-Web GUIs, labels are only clickable for checkboxes and 
> radiobuttons.* It would be nice if exactly the same was true for 
> HTML+WF2, otherwise people would end up wasting time clicking listbox 
> etc labels in native apps and wondering why nothing was happening.

I'd also suggest that exact focus behavior would be defined for all 
cases. For example, see [1] and test case [2]. I'd definately allow 
label for any control to be clickable. If some native GUI has low 
usability [3], please, let's not limit all *future* browsers and 
native GUIs because of that. Perhaps add a note explaining that some 
native GUIs do not support that feature and some user agents may opt 
for bug-compliant behavior.

[1] http://bugzilla.mozilla.org/show_bug.cgi?id=213519

[2] http://bugzilla.mozilla.org/attachment.cgi?id=128314&action=view

[3] It really doesn't make any sense to have non-functional areas on 
GUI. Especially if those areas do logically have 1:1-relation to 
some control. So allow those areas to be clickable for better 
usability. I also use mouse gestures in my browser and I often find 
myself trying to use some of the gestures for native windows too. I 
still think that the fix to that problem is to fix the native 
windows, not to remove the functionality from my browser.


More information about the whatwg mailing list