W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > January to March 2004

Re: onclick behaviour also triggered by keyboard ?

From: Nick Kew <nick@webthing.com>
Date: Sat, 13 Mar 2004 00:10:19 +0000 (GMT)
To: "P.H.Lauke" <P.H.Lauke@salford.ac.uk>
Cc: w3c-wai-ig@w3.org
Message-ID: <Pine.LNX.4.53.0403122359540.14910@hugin.webthing.com>

On Fri, 12 Mar 2004, P.H.Lauke wrote:

> A nice Friday afternoon (at least where I am) question for the list:
> although the HTML4.1 specification states that onclick "occurs when
> the pointing device button is clicked over an element" (see
> http://www.w3.org/TR/html4/interact/scripts.html#h-18.2.3 ), in my -
> admittedly limited - testing I have found that it's also triggered by
> keyboard in the usual way in most (if not all) browsers

Yes, of course.  To do otherwise would be to cripple mouse-free browsing.

> So, my question would be: as there's contention as to what the
> device-independent handler equivalent to onclick is (as onkeypress just
> seems to be too generic in that it will be triggered by any key...and
> also would seem like complementing a device-specific handler with yet
> another device-specific one...what about things like voice activation
> in this context ?)...what's the deal ?

The deal is merely that the word "click" triggers a Pavlovian response
in some zealots, blinding them to the observation in your first
paragraph.  So it gets labelled as device-dependent.  In an environment
where consensus is an issue, that leads inevitably to muddle and

> Is onclick simply a misnomer, and it should be handled as if it was
> something like "onactivation"


Though calling it a misnomer is perhaps unduly pedantic.  Click is
after all the "expected" event, and the others are just obvious

There are genuine device-dependence issues in scripting events.
But the naming of onclick() isn't one of them.

Nick Kew
Received on Friday, 12 March 2004 19:10:51 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 13 October 2015 16:21:27 UTC