Accesskeys for Creating Keyboard Shortcut
Implementation of access keys is optional.
accesskey was included in HTML to provide a way for developers to provide keyboard shortcuts to frequently used links or form controls. One of the major envisioned uses of accesskey was to improve accessibility of web resources for people with disabilities. This potential has never been realized for various reasons, including:
- Conflicts with assistive technologies like screen readers
- Slow implementation by web browsers and differences in browser implementations
- Poor internationalization
- Lack of support by web browsers to notify availability of access keys to users
While accesskey does not enjoy wide spread success, it id still useful for providing consistent access to common page structures. The three common structures found in many websites are a primary navigation bar, a content section and a search function. Providing consistent and efficient access to these structures can be accomplished through access keys and internal links.
- Accesskey ‘1’: Main content
- Accesskey ‘2’: Search
- Accesskey ‘3’: Main navigation bar
Using numbers as access keys and limiting the numbers of access keys eliminates many of the internationalization issues and makes the access key set easier for users to remember.
When websites implement access keys, this should be clearly indicated for the screen reader users.
Benefits to People with Disabilities
- Keyboard users, including people with physical disabilities and screen reader users, can directly navigate to form controls and other major elements of web resources.
Benefits to Everyone
- Users can navigate directly to form controls and other major elements.
Benefits to Developers
- The website is more usable for keyboard users.
- Using Accesskeys – Is it worth it? (John Foliot)
- Use the
accesskeyattribute to create keyboard short cuts to main content, search, main navigation bar and frequently used form controls
- Accesskey characters should be unique on every web page