Web browser Access Keys were developed to enable a computer user to go to a particular web page or field immediately when a specified key is pressed alongside the Alt key. It is not recommended that they are used because they cause more issues for users of adaptive technology (AT) than they solve.
In 1999 Access Keys (external website) were first introduced and most browsers now support them.
The UK Government published in May 2002 the Building in universal accessibility + checklist (external website) (which was archived on 3 July 2010) and defined the UK Government accesskeys standard (external website) which recommends the following keys and their use:
Key | Page |
---|---|
S | Skip navigation |
1 | Home page |
2 | What's new |
3 | Site map |
4 | Search |
5 | Frequently Asked Questions (FAQ) |
6 | Help |
7 | Complaints procedure |
8 | Terms and conditions |
9 | Feedback form |
0 | Access key details |
Keys | Page |
---|---|
Alt + 0 | Access key details |
Alt + 1 | Site homepage |
Alt + 3 | Sitemap |
Alt + S | Skip navigation |
It can be helpful to the user to do something to show what key is the access key and this can be done in a number of ways. For example one method is to show which key is the access key via the use of an <u>
So for the link below
<a href="index.aspx" accesskey="h">Home</a>
It would be
<a href="index.aspx" accesskey="h"><u>H</u>ome</a>
Or emphasis could be used
<a href="index.aspx" accesskey="h"><em>H</em>ome</a>
Or CSS can be used
*[accesskey]:after {content:' [' attr(accesskey) ']'}
It can be helpful to the user to do something to show what key is the access key and this can be done by showing a list of the keys and what they do.
- There is poor support amongst the browsers (and different operating systems use different keys to activate them)
- There is not a standardised set of accesskeys but if accesskeys are to be useful to a website, they must be specifically customised for that website – the number of frequently used common keys are very small
- The accesskey may not work in a particular combination of AT, browser and OS whereas it will work in another
- Some accesskey values are missing on specific keyboards, such as particular language ones.
- There is the possibility of activating the accesskey accidentally if the user is not aware that it exists
- If the user has cognitive issues then accesskeys that use numbers can be confusing especially if the functionality does not have an association to the number that is logical
- The accesskey may conflict with short cut keys within the AT or the browser and stop important functionality being accessed
- Using the accesskeys can be more difficult that normal typing often requiring greater dexterity
JavaScript can be used as an alternative to activate shortcut key functionality because it is able to detect key presses, or a combination of key presses, but there may be possible conflicts that are hard to identify.
Screen readers used in Windows support interaction with browser rendered content by using a virtual model. A virtual buffer of content is generated using the page content, based upon the accessibility tree and information in DOM, and the screen reader presents this to the user.
The screen reader interacts with the virtual buffer by listening for events generated by the keyboard. When a key press is detected that has a corresponding command utilised by the screen reader, that command is executed in the virtual buffer. If there is not a corresponding command, the browser is passed the key where it will be captured by the JavaScript handler.
Unfortunately, most available keys are allocated for Windows screen reader specific commands, and not many keys are able to pass through to the browser, and the JavaScript shortcuts therefor do not get triggered.
You can tell Jaws and NVDA to route the next key to the browser:
- NVDA - press NVDA modifier (insert) f2, followed by the key to be passed through
- Jaws - press Jaws modifier (insert) 3, followed by the key you want to pass through
Good usability allows the website design to provide flexibility, and user controls will help make a website accessible, and while there are always going to be trade-offs, this will enable the adjustment of the interface to match users’ requirements, and work with their accessibility settings, assistive technology, and adaptive strategies.
We would recommend due to the noted accessibility concerns of access keys that they are not used, but if you are going to use accesskeys use the GOV.UK (external website) standard or if it does not apply:
- Determine commonly used or important links on your website
- Place the links into a numbered list
<ol>
- Use the numbers "1" - "9" in order for the items in the list
- Throughout the website use this consistently
- Put the list after the main content at the bottom of the page unless they can be in the navigation bar (if there are two or three)
Remember access keys are a fallback for things that do not have a standard activation behaviour.
- Access Keys (external website)
- WHATWG community HTML Living Standard (external website)
- WHATWG community The accesskey attribute (external website)
- W3C Accesskey (external website)
- Shared Techniques wiki for the W3C Mobile Web Initative Best Practices AccessKeys (external website)
- W3 Schools Global Access Keys (external website)
- MDN Web Docs Access Key (external website)
- WebAim Accesskey (external website)
- Why Access Keys Are Mostly Useless for Accessibility Purposes (external website)
- Usable Accessibility: Making Web Sites Work Well for People with Disabilities (external website)
- Time to revisit accesskey? (external website)
- WUHCAG - Keyboard (2.1.1 – Level A) (external website)
- UK Government accesskeys standard (external website)
- HOBO SEO Consultancy - UK Government Access Keys Standard For Websites (external website)