WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: Hotkeys in ARIA applications

for

Number of posts in this thread: 1 (In chronological order)

From: Stéphane Poinsart
Date: Mon, Jun 03 2013 12:07PM
Subject: Hotkeys in ARIA applications
No previous message | No next message

Hello,

I have a technical question about ARIA best practices for HTML 5 web
applications where hotkey are used. It's quite common for HTML 5 games,
email clients and other online services to offer keyboard shortcuts for
very commonly used functions.

In HTML5 + javascript I can do it easily, and there is a clear method
that avoid most common conflicts with the browser hotkeys, the
preventDefault function :
https://developer.mozilla.org/en-US/docs/Web/API/event.preventDefault .
Using this ensure that my own javascript page can handle the keypress
and avoid to trigger the behavior that could exist in the web browser.
I'm very well aware that this should be used with care because disabling
keyboard access to some possible browser feature can be in a range from
an annoyance to a major usability problem so this only serve the purpose
of handling special interactive pages where the traditional navigation
paradigm do not apply.

However, this method does not seem to works with screen-readers : the
key press is handled by the screen reader and not as javascript events.
In my case, I have an application where it could be particularly useful
for a user to input a number from 1 to 4 with the keyboard but NVDA (and
I assume most screen readers) use it for header navigation. So the input
keys do not seems to work, and no preventDefault or similar javascript
tricks seems to work.

I have attempted to use the role="application" but in that case, NVDA
completely ignore the application content by default, and if I force the
focus inside the application tagged element, the content is only read
partially. I assume this is the intended behavior and that for the
second part it can be programmed otherwise, but I was still wandering
before I go to heavy on the subject if I was going in the right direction.

Is there any best practice about this "hotkey" case ?

(I hope this is the right place to ask, i was wondering whether this
kind of technical question should be posted here or one of the w3c
mailing list...)

Regards,

Stephane

--
Université de Technologie de Compiègne
UI - Ingénierie des Contenus et Savoirs
Tel: 03.44.23.44.51