Creating A Skip Navigation Link in Drupal
After we have created a skip navigation for your site, I would like to talk about skip navigation in Drupal.
Here, we will discuss Drupal versions up to Drupal 6, because there may be some changes in Drupal 7. We will be talking about Drupal 7 later this year.
The problem is that many web developers want to have a skip navigation on their site, but most of the Drupal themes don’t have such a feature.
There are, however, many themes which are accessible, or can be made accessible with little adjustments. But there is a way to create a skip navigation link in all themes.
Let me highlight two themes which are very accessible out of the box, but there are many more. One is the Flexible Theme. This theme is very strong on accessibility. Another one is the Tapestry Theme, which is my personal favorite theme for accessibility purposes. However, the Tapestry Theme for example, does not have a skip navigation built into it.
But there is a very easy way around it. And you can achieve this by establishing two blocks. First, go to the administration menu and select Site Building and Blocks. Then create a new block.
The first new block will be the actual link which skips past the content. Here is a sample code you can place in the first block, into the block body:
<a href="#content">Skip to Content</a>
Then save the block and place it at the very top of the content where you want to skip from.
Next, create a second block. This block will have the bookmark you are skipping to. Based on our sample code above, this would be the code for your second block:
<a name="content"> </a>
Save your block and move it to the top of your main content. You are done. Try clicking on the skip navigation link that will let you jump to the bookmark you have created. Make sure you have a skip navigation link in all the pages in your site.
Note: When you create a block, remember to select Input Format and pick Full HTML. The steps above will not work if you don’t pick Full HTML.