WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Keyboard behavior with JAWS

for

From: Léonie Watson
Date: Aug 24, 2015 6:19AM


> From: WebAIM-Forum On Behalf Of pratik roy
> Sent: 24 August 2015 11:05
>
> In our webpage, we have some button elements and onclick of those
> buttons, it is performing some action. We have used onkeypress event with
> keycode="13" (Enter) to handle the functionality. But when I hit Enter it is
> not even firing the event but working absolutely normal with "Alt+Enter".

You don't need to use the keypress handler. When the <button> element is used with a click handler, the browser automatically handles keyboard interaction for you.


Léonie.

--
GDS Accessibility consultant +44.7921168551 @LeonieWatson