HTML and CSS Reference
In-Depth Information
The accesskey and tabindex attributes provide access to elements on the page us-
ing the keyboard, which may be helpful for users with limited mobility. When set on
an element, the accesskey attribute allows a key (or keys) to be pressed on the key-
board that activates the element. It could be used for following a hyperlink using the
keyboard, for instance. Unfortunately, this accessibility upside has a downside. A key-
board combination is often needed to activate the access key, such as pressing the Ctrl
or Alt key in combination with the set access key. Precisely which keyboard combin-
ation to use varies by browser and operating system, degrading the usefulness of this
feature. Additionally, the keyboard combinations used could interfere with existing key-
board shortcuts—most critically those used by screen readers for visibility impaired web
users. Lastly, having multiple access keys set on a single element (which could be help-
ful if the website is viewed from two types of devices) does not enjoy wide browser
support. All of these factors make using access keys rather discouraging.
One last note before we move on—Opera Software's Opera web browser offers a nice
feature in regard to access keys. By pressing the Shift key and the Esc key at the same
time, a menu pops up over the web browser window that shows all access keys available
on the page and where they link to (if the attribute is set on anchor elements; “null” is
shown otherwise). See Figure 2-1 for an example.
Figure 2-1. Opera web browser showing access key and associated links available on the com-
pany homepage
Search WWH ::

Custom Search