Home

Even Grounds, Accessibility Consulting

Making web sites, documents, software and hardware accessible to people with disabilities. Accessibility, WCAG and Section 508 compliance testing and auditing.

  • Services
  • About Us
  • Customers
  • Contact Us
  • Articles
  • Blog
  • Developers' Corner
  • Press
  • Resources

Are You Receiving the Accessibility Tips and Tricks?

  • Learn to make information accessible to people with disabilities
  • Implement what you learn right away
  • Understand how people with disabilities use technology
  • Receive our monthly newsletter packed with news, articles and updates
  • Bonus workbook: Ten steps to a more accessible web site


Do you need help with accessibility? Hire us!

Creating A Skip Navigation Link In WordPress

  • Developers' Corner
  • Skip Navigation
  • Web accessibility
  • Wordpress

Skip navigation is an important feature for accessibility. Skip navigation allows screen reader users and persons with motor disabilities to go directly to the main content, without pressing the arrow or tab keys multiple times.

Using WordPress, you can easily do this in your pages. Below are the steps on how to create a skip navigation in WordPress.

How to Create a Skip Navigation in WordPress

The simplest way to insert a skip navigation link to your page is by modifying the current theme you are using. To do this, we have to edit three PHP files located in the current theme’s folder (e.g. wordpress/wp-content/themes/FolderOfTheCurrentThemeUsed):

  • header.php – Preferably, this file would be the ideal place to put your “Skip to Content” link
  • index.php – has the contents of your main page
  • page.php – has the contents for all the other pages.

Open header.php using a text editor. You then have to look for the line for the description. By default, it looks like this:


<div class="description"><?php bloginfo('description'); ?></div>.

Enter a new line below it to type in your skip-navigation link tag.


<a href="#skiphere">Skip to content</a>.

It should look like this:


<div id="header" role="banner">

<div id="headerimg">

<h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>

<div class="description"><?php bloginfo('description'); ?></div>

<a href="#skiphere">Skip to content</a>

</div>

</div>

You then need to format your skip-navigation link using your current CSS in order to blend it with the current theme.

The next few steps for the index.php and the page.php files will be relatively similar.
Open the files using a text editor and by default the content area is under a CSS <div> below:


<div id="content" class="narrowcolumn" role="main">

Enter a blank line below it and type the <a name> tag.
It would then look like:


<div id="content" class="narrowcolumn" role="main">

<a name="skiphere"></a>

<?php if (have_posts()) : ?>

There is no need to modify a style for it in the CSS, since it’s not visible in the page. After doing the modifications above, test the skip navigation link.

Bookmark/Search this post with:
  • Delicious
  • Digg
  • StumbleUpon
  • Facebook
  • Google
  • Yahoo
  • Technorati

hmm

Submitted by foo (not verified) on Mon, 03/22/2010 - 01:53.

havent tried this one yet but maybe i can give it a shot. thanks for the tip!

  • reply

Nice!

Submitted by Ted Hessing (not verified) on Mon, 06/07/2010 - 10:48.

Nice, elegant solution here Tom!

  • reply

havent tried this one yet but

Submitted by kral oyun (not verified) on Sun, 06/20/2010 - 09:00.

havent tried this one yet but maybe i can give it a shot. thanks for the tip!

  • reply

so many thanks!

Submitted by müzik dinle (not verified) on Sun, 06/20/2010 - 09:03.

thank you so much. this is very helpful for me. thank you :)

  • reply

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

This blog uses CommentLuv plugin which will try and parse your sites feed and display a link to your last post, please be patient while it tries to find it for you
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.

Accessibility Tips and Tricks


RSS

  • Articles
  • Blog
  • Developers' Corner
  • News
  • Press

Follow us on Twitter, YouTube, or on Facebook

You Might Also Like:

  • Creating A Skip Navigation Link in Drupal
  • Using Skip Navigation Links
  • Making the iPhone Keyboard Accessible
  • Save a Lot by Choosing the Right Widgets
  • Pages Opening in a New Window

Top Commentators

  • games games (11)
  • games games (10)
  • agame (9)
  • games games (8)
  • New Game (8)
  • andkon (8)
  • kizi (8)
  • nick games (8)
  • kizi (8)
 

Privacy Policy

Copyright 2007-2011 - Even Grounds Inc., Accessibility Consulting