I need to add a 'skip navigation' (aka jump to content) link to my site, as it has a high proportion of users who are likely to be using screen readers.

I'm using a phptemplate driven theme, and have tried various things with no success.

I have added the following code to the top of my template:

<div class="hide"><a href="#content" title="Skip navigation." accesskey="2">Skip navigation</a>.</div>

I cannot get the anchor part of the process to work.

Am I missing something obvious (quite likely, as this will be my first Drupal site)?

Comments

Anonymous’s picture

I've been trying tp resolve this issue, as there appear to be a number of phptemplate themes that seem to include this functionality in them. However, when tested, they don't appear to actually work.

For example, Green Marinee has the following code in the theme:

<div id="skip">
	<p><a href="#content" title="Skip to site content" accesskey="2">Skip to content</a></p>
	<p><a href="#search" title="Skip to search" accesskey="s">Skip to search - Accesskey = s</a></p>
</div>

However, the skip to content link simply sends you to the content area on the home page.

I can't figure out how to make it stay on the current page. I've tried toggling clean urls on and off, but this makes no difference.

So, has anybody been able to make this functionality work? Or, any suggestions or pointers?

Anonymous’s picture

After much searching of this site, and lots of trial and error, the following appears to work:

<div class="hide"><a href="/<?=$_SERVER['REQUEST_URI']?>#main" title="Skip to site content" accesskey="2">Skip to content</a></div>