A recent article at The Web Standards Project alerted designers that ‘Skip Navigation’ links, traditionally hidden with the CSS property display:none, are invisible to screenreaders. This hadn’t occurred to me, even though I knew it was a problem with Fahner Image Replacement, which also uses display:none.
If you’ve got a long list of navigation links, skip links give users the option to go straight to the content, useful if you have a textbrowser, PDA or screenreader (doh!). It can be particularly painful to hear a screenreader speak al long list of links before finally getting to the content.
Put ‘em somewhere else
One way around this is to use a layout technique that allows navigation to be placed after the content, removing the need for the link. The Layout Reservoir at Blue Robot has useful examples on how this can be done. Navigation is positioned using position:absolute, which takes it out of the normal flow of the page, allowing it to go anywhere in your HTML. This won’t always be possible of course, and if you do, you’ll need to add a ‘skip to navigation’ link instead!
The following workaround was developed by Bob Easton, who wrote the original article on CSS Discuss, and works in the top 3 screenreaders – Jaws 4.51, Window-Eyes 4.5(beta) and IBM Home Page Reader 3.02.
<div class="skiplink"><a href="#content">Skip Navigation</a> </div>
As you can see, it places the content off the screen to the left. Bob also added width, font-size and line-height to allow for extra information such as a menu of your accesskeys. The width rule is a failsafe, to make sure that div doesn’t become visible. If your link is a small simple affair, you can remove the width and font attributes. Tom Gilder extends this further , with a clever technique that makes the div visible when a user is tabbing through.
Don’t hide ‘em
However, Joe Clark argues the case for making these links visible. He lists several ways of doing this, and keeping it small, suggesting that just the word ‘skip’ would be acceptable.
- 2003 23 Sep
- Comment via Twitter