WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: keyboard accessibility (WCAG) vs keyboard shortcuts?

for

From: deborah.kaplan@suberic.net
Date: Apr 18, 2016 12:12PM


You should always be suspicious of somebody saying site-specific keyboard shortcuts are for accessibility. Keyboard shortcuts very rarely provide accessibility, and frequently conflict with the existing keyboard shortcuts of the browsers, assistive tech, and accessibility add-ons used by people with disabilities.

A site, in order to conform to WCAG, must make sure all controls that are accessible via mouse are also accessible via keyboard. This will happen naturally in the keyboard-accessible browsers if the techniques are followd (<https://www.w3.org/TR/WCAG20-TECHS/Overview.html>). Essentially, almost all native HTML5 elements will have the default accessibility (assuming best practice is followed for those elements), and then use WAI-ARIA and JavaScript as necessary to add keyboard accessibility where other practices mean it's not natively there.

Site-specific keyboard shortcuts (e.g. pressing on the right arrow takes you to the next page, or pressing on the question mark brings up a help page) have a high probability of clashing with existing assistive tech, and if you add them you should make sure:

1. there is a setting to turn them off and
2. there is a clearly labeled help page telling users how to find them and how to disable them

Outside of the kind of pure webapp which works more like a desktop app than a web page (eg. google sheets) or sites people use constantly (eg. Facebook), users are unlikely to remember keyboard controls that are different from their regular web browsing experience anyway.


Also see: https://github.com/chaals/accesskey

"This is a draft alternative specification for a proposed replacement for the accesskey section in HTML. It has now been proposed to the Web Incubator Community Group as an item for further development, so discussion can be fragmented between filing issues here, or talking about it there.

The rationale is that interaction for web applications at the moment commonly introduces unexpected changes to the way a user agent behaves, hijacking functions that users rely on. This is an inevitable result of using javascript to define the interaction. Without a standard mechanism for knowing what specific interaction behaviours an author has requested, nor for authors to request a behaviour and allow the user agent to remap it, there is no way to do conflict resolution.

The purpose of working on the accesskey attribute is in part to help resolve this situation: As a markup attribute reflected in the DOM, accesskey offers naive authors a simple way to extend interaction without the need for them to write script, while providing a framework which is exposed to script authors"


Deborah Kaplan

On Mon, 18 Apr 2016, Bruno, Michele wrote:

>
> Hello Fellow Advocates,
> I have had multiple recent requests asking about "keyboard shortcuts for accessibility" we have in our web applications. I searched WCAG again just in case I missed something and only see reference to keyboard accessibility; users should be able to navigate/interact with web pages solely with standard keyboard navigation. I get this. Other than WebAIM reference: Keyboard shortcuts are a standard accessibility feature of most operating systems. Beyond this, and/or possible mis-understanding of keyboard (accessibility) vs keyboard shortcuts (OS standards), is there something more to be aware of?
> Thank you in advance.
> > > > --