E-mail List Archives

Javascript OnClick event

for

From: Rachel
Date: Oct 30, 2002 4:22PM


A webmaster at one of the federal agencies told me
that in order to make onClick JavaScript events work
for people using a keyboard (who can't use a mouse),
you should also include an onKeyPress.

example:
a href="link.html" onClick="confirmChange()"
onKeyPress="confirmChange()"

However, I haven't seen a mention of this in Jim
Thatcher's excellent article that explains that you
need to make JavaScript accessible to keyboard users.
(http://www.jimthatcher.com/webcoursea.htm) in fact,
he says "OnClick works for both mouse users and
keyboard users..."

Is this true? If I just have an onClick, will that
work for people using keyboards? Does it help to add
an onKeyPress, or is there no added value?

Thanks
Rachel


__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/


----
To subscribe, unsubscribe, or view list archives,
visit http://www.webaim.org/discussion/