W3C home > Mailing lists > Public > www-html@w3.org > October 2003

Re: LABEL behaviour

From: Toby A Inkster <tobyink@goddamn.co.uk>
Date: Thu, 9 Oct 2003 14:34:07 +0100
To: Ian Hickson <ian@hixie.ch>
Cc: ????????? ????? <a.skorecki@taom.ru>, "www-html@w3.org" <www-html@w3.org>
Message-ID: <20031009133407.GA8367@ophelia.goddamn.co.uk>
On Thu, Oct 09, 2003 at 01:19:33PM +0000, Ian Hickson wrote: 
| On Thu, 9 Oct 2003, [KOI8-R] ????????? ????? wrote:
| >
| > Now LABEL distribute only Click event
| > (http://www.w3.org/TR/html401/interact/forms.html#edef-LABEL), but i see
| > no reasons why HTML shouldn't handle mouseOver event.
| 
| A label does not "distribute click events", it merely passes focus to its
| control when it is focussed. It does not matter exactly _how_ the label is
| focussed.

Or, to put it another way, it has a default onfocus event attribute of:

document.getElementById(this.for).focus();

Of course, the browser implements this internally, so it will work even 
if scripting is unsupported or disabled.

My DOM and ECMAScript are a little rusty, but I think thats right.

-- 
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?id=132

Received on Thursday, 9 October 2003 09:38:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:58 GMT