« Draw traffic with OpenSearch | Home | User generated content - a curse or salvation? »

Navigation anchors

Words by Daniel Aleksandersen on 2006-07-22

Adding anchors drastically increases a Website’s navigation accessibility, especially if readers have disabled the CSS or are viewing the site from a handheld device.

To get it straight: anchors are on-page navigation. They provide readers with a quick way to skip down to a spesific section on that page.

It does not mess with the site's regular design either, since the anchors will be hidden from most readers. And if they are not hidden from a reader, that reader will be really happy they are there.

Adding and styling navigation anchors is simple.

First add a paragraph with the anchors at the very top of the page. Something like this would suite most sites:

Skip down to navigation, content or the ordering form.

<p class="accessibility-helpers">Skip down to <a href="#navigation" title="Skip down to navigation">navigation</a>, <a href="#content" title="Skip down to content">content</a> or the <a href="#ordering" title="Skip down to ordering form">ordering form</a>.</p>

Content might be to generic for most pages, experimenting a little and be as descriptive as possible: article, comments, chekout, contact information, et cetera.

The second step is adding the anchors to the page. Remember to apply the class to avoid whitespaces and place the anchors at the very top of each section. See XHTML notation.

<a class="accessibility-helpers" name="navigation" title="Site navigation"></a>

The last step is hiding the anchors from being displayed on regular screens, projectors and on printed versions of the page. In other words: keep them away from the regular design of the page.

Add the following to the style sheet to hide them from the regular site design:

@media screen, projection, print { #accessibility-helpers {display:none; } }

Note: aural browsers will read the hidden content aloud. Hiding content from aural browsers is not a good idea since it will be read even though it is not visible. Notably, it might cause confusion if a reader is only listening to the page, but not having the visual anchors visibile.

Anchors in XHTML

In XHTML anchors can be applied to ids appended to anything. Like:

<div id="content-section">

But this is not supported in many older Web browsers.

2006

Copyright © Daniel Aleksandersen – Licensed under GNU FDL

Words: Daniel Aleksandersen on 2006-07-22 at @833.
Meta: Comments | PermaLink | TrackBack
Social: Add to del.icio.us | Sphere it
Tags:

Related entries

2 comments

displaying them on screen negates their usage by those without visual impairmnts. I have a physical disability and like them to make moving around the screen easier when using the keyboard. Also, making them visible sends the message that you cared enough to address accessibility and provides a teaching moment.

Steve at 2006-07-23 @217.

I am currently working on a recommendation for how Web browsers and Web designers can allow the view of additional accessibility information.

Like the new access key interface in Opera 9 for other accessibility features.

Daniel at 2006-07-25 @788.

Leave your comment




Find entries


Recent entries
News feed icon Get a free subscription to new entries in the The Web Design Journal!
Reader participation
Share your thoughs, and knowledge with other readers by submitting your own comments!
License

Creative Commons License
The blog entry Navigation anchors is licensed under a Creative Commons Attribution-ShareAlike 2.5 License. More legal notes.
This blog is compatible with mobile browsers.
Home | Senior Cell Phone | California Amusement Park | Professional SEO Consultant | Legal Buds | San Diego Casino |
© 2006 - 2008