Using Accesskeys query?

Ive got the UK government recommended list that being :

s - Skip navigation
1 - Home page
2 - Newsroom
3 - Site map
4 - Search
6 - Help
7 - Complaints
8 - Terms and conditions
0 - Access key details

I have assigned the relevant accesskeys to my main navigation <a> links, but I still cannot get access via the keyboard to the designated pages.
I understand that different browsers use different key pairing, but with all the variants not working in either browser then I assume Ive made a boo boo with my HTML.I have tried all of the following keyboard processess and none of which work on either Firefox or IE:

shift + “x num”
ctrl shift + “x num”
alt + “x num”
alt shift + “x num”

Have I missed something else out with my HTML ?

example HTML code :

<a href=“” accesskey=“5”>faq</a>

To use the skip navigation where out of interest do I place the "accesskey=“s” ?

Thanks all


That works fine for me in FF. On a Mac, it’s Control + 5 (but I don’t know about Windows, I’m afraid. It should be easy to look up on the FF website, though.)

To use the skip navigation where out of interest do I place the "accesskey=“s” ?

You might as well combine it with a Skip link at the top of the page:

<a href="#content" accesskey="s">Skip to Content</a>

The problem with accesskeys is that there’s no good way to let people know they exist. So I prefer skip links like this. Normally, the skip links are hidden from view; but it’s really cool to have the skip link become visible when the link receives focus, so that sighted keyboard users know that it’s there.

Cheers for that skiplink advice Ralph :slight_smile:

Out of interest because I cannot still get these accesskeys to work, I just want to run through exactly where Im supposed to be implementing the accesskey code :

Im only actually using :

home page = accesskey = 1
faq page = accesskey = 5
contact page = accesskey = 9
access list page = accesskey = 0

Are the above accesskeys are only placed on the desired page so they only have 1 instance of being written. So the home page accesskey is soley written in the main navigation on the homepage in the actual homepage anchor tag, and then the same goes for the faq/contact & accessibility pages, or is each accesskey instance repeated across all navigation <a> tags and all html pages in the site ?

Sorry if I come across some what confused, its just that this is the first time Im implementing them into a website.:confused:

Typically you would repeat the access keys throughout the site navigation where appropriate - since you cannot guarantee which page the user is on at any particular time.

So it would be silly having a single occurrence of a key (on one page only) if many pages had links to it, e.g. like the home page.

A generic page menu: <a href=“index.htm” accesskey=“1”>My Site’s Home Page</a>

You would preferentially want the user to be able to navigate to the home page (site-wide) from several places, by pressing the numeric key ‘1’, etc.

No, as Robert said, place the access keys on all pages, such as in the main menu. If you only have the accesskey to the home page on the home page itself, it will simply provide an easy way to navigate to the home page when you are on the home page itself. Which is completely pointless, of course. You want to be able to press an access key to navigate to the home page when you are on any other page.

The UK list bothers me because it makes navigation across pages on the site, which the user should likely already have access to in any situation with accesskeys; I prefer to assign mine to on-page navigations so they can hop between sections quickly – which is why my accesskeys are usually assigned to my hidden .jumpto menu.

One bit of advice – put titles on those anchors when you make accesskeys. In blazer and Opera when you pull up the accesskeys menu if you don’t have title on them it will show the URL instead of the text inside the anchor. (go into Opera for desktop, hit shift-esc to see the accesskeys menu.).

Cheers to Robert and Ralph for great advice, and to deathshadow yet again for that handy tip with opera. I can see what you mean ref “shift + esc” with no title tags, its ugly! Now amended and looking all pretty again in Opera. :slight_smile:


RALPH: Its good that those access keys work for you,:slight_smile: but they are still not working on my laptop.:confused: Can anybody else shed any light to the reason why Im unable to gain access to the accesskeys but Ralph is… ?

Im using Windows (7 if that makes any difference which it wont) and have tested across all the latest browsers so: FF/IE/Opera/Chrome and Safari, and none of my keyboard pairings work, those being :

alt + num
ctrl + num
ctrl + shift + num
alt + shift + num

What does “num” stand for? Have you tried pressing alt and 5 at the same time, for example?

To diagnose more, we’d have to see the site in question.

It looks like they’ve changed the access key combos awhile back:

In IE, you press Alt + __, and that link gets focus. Hit enter, to go. FF you should just be able to hit alt+Shift + ___ and it goes.

I gotta say, I prefer IE’s way. It mimics what happens with links: first I focus, THEN I can either enter or move on. As it should be. Go Team IE.

I discovered recently that if a form element is given an accesskey (say the username input of a login form), Opera will use the value of the input the same as it would use a title on an anchor.
Though I also saw a checkbox with one and it had a value=“1” so Opera called it “(null)”. That checkbox should not have an accesskey in the first place.