[thelist] label tag and selecting checkboxes

James Aylard evolt at pixelwright.com
Thu Sep 19 17:15:01 CDT 2002


> Now, to me it IS intuitive to click the label and select the box, in
> fact its easier. But thats just my opinion and he has his, which is
> fine. Question is - isn't that part of the reason why the label tag
> was created - and doesn't this have something to do with
> accessiblity?

    Yes, it gives the user a larger target on which to click, and has been
part of standard Windows functionality (and probably that of other OSes)
going as far back as I can remember.
    The only way it would be confusing, IMO, is that it is implemented so
rarely on the web that a user might not be familiar with it within that
context. However, the use of a dotted line around the label to indicate that
it is the active item provides a very definite visual cue. Additionally, any
user who expects to have to click on the checkbox or radio button directly
in order to activate it can continue with that behavior unhindered.
    IMO, for those reasons it is desirable to use the label attribute, not
to mention that your markup is more granular.

James Aylard

More information about the thelist mailing list