Accessibility tip of the day: accesskey attribute
What are access keys?
No they’re not some new cool thing, they have been around for a good few years and they’re popping up more often. You might see information about them on a sites’ accessibility page or a link in the footer explaining title “Access Keys”.
Access keys are keyboard shortcuts to frequented links on your site. In practice they are typically used for accessing the main sections for the site and other content you consider important. They are accessed slightly differently across browsers but usually you press Alt + the corresponding access key. For example, if the access key was number 1 you would press: Alt + 1
To see them in actions visit http://www.eurocom.co.uk or www.sitepoint.com see the footer where it says AccessKeys.
Why use access keys on a website?
People with limited mobility may not browse your site with a mouse. Or maybe they struggle to use a mouse and tab through your site with the keyboard. Also for shortcut happy people like myself, they can enhance the usability of your site.
How can I implement them into my website?
Very simply. All you have to do is add this to the links you want to make into an access key: accesskey=”" So your link might end up looking like this:
code:
You must be careful not you use any critical shortcut keys such as “p”. This is usually used for printing a document. Its best practice to start with number 1 and go up.
Make sure you identify your access keys somewhere on your site and also instructions with how to use them on the popular browsers.
