Fixit – Access keys

Access keys allow a user to quickly navigate to a link on a page by assigning one of the keypad keys to that link. This removes the need to navigate to the link using repeatedly pressing the navigation key of a device. This tests determines if you have used accesskeys in your markup and raises a warning where appropriate.

 

Specifying an access key

To assign an accesskey to a link in you markup, simply use the accesskey attribute in your a element:

[1]<a accesskey="1" href="link1.htm">Link 1</a>
[2]<a accesskey="2" href="link2.htm">Link 2</a>
[3]<a accesskey="3" href="link3.htm">Link 3</a>

The first line assigns the "1" key to the link link1.htm. The second line assign the "2" key to link2.htm and the third line assigns key "3" to the link link3.htm. It is also good practise to bring attention to the fact that an accesskey has been assigned to a link. The easiest way to do this is to place the assigned key beside the link. In the examples above, this is acheived by including [1], [2], [3].

Note that this test is not part of mobileOK basic. It is not always appropriate or possible to make use of the accesskey attribute in your markup, for instance if your page contains no links. Therefore, if you do not include an accesskey, a warning will be raised, but your mobiready score will not be affected.

 

Reference

This test is based on a W3C mobileOK (but not mobileOK basic) best practice. See http://www.w3.org/TR/mobile-bp/#ACCESS_KEYS for more details

 

Exclusive tips, how-tos, news and comment

Receive monthly updates on the world of mobile dev.

Other Products

Market leading device intelligence for the web, app and MNO ecosystems
DeviceAtlas - Device Intelligence

Real-time identification of fraudulent and misrepresented traffic
DeviceAssure - Device Verification

A free tool for developers, designers and marketers to test website performance
mobiReady - Evaluate your websites’ mobile readiness

© 2024 DeviceAtlas Limited. All rights reserved.

This is a website of DeviceAtlas Limited, a private company limited by shares, incorporated and registered in the Republic of Ireland with registered number 398040 and registered office at 6th Floor, 2 Grand Canal Square, Dublin 2, Ireland