Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   Skip Nav: Where do I send the focus to? (http://forum.bytesforall.com/showthread.php?t=1173)

bcorrigan Apr 8, 2009 05:18 PM

Skip Nav: Where do I send the focus to?
 
Hi,

I want to add a skip nav link.

I'll put the link at the top of HTML Inserts: Body Top:
HTML Code:

<a class="invisiblelink" title="" href="#content">Skip to Main Content</a>
then I'll put in some CSS to hide this link from users with good vision.

What I would like to know is if there is a way to send the focus to .post-bodycopy, or where I could put something in index.php so I don't have to put something in every post/page?

Any thoughts?

-Bill

Flynn Apr 9, 2009 06:35 AM

If you put <a name="content"></a> right above <!-- Post Body Copy --> in index.php then it would be there on all pages

bcorrigan Apr 9, 2009 09:44 AM

Thanks Flynn.

So then to complete this thread, what I'll do is add the following CSS insert:

HTML Code:

/* decorate the Skip to Main Content Link. This moves the link off screen, but still available to screen readers. User who tab will get the link on the screen, and when they press return will jump to the content of the post or page */
.invisiblelink  a {
padding: 0 0.5em; display: inline; z-index: 2;
text-decoration: none; position: absolute; width: 14 em; left: -200em;
}
.invisiblelink a:focus, .invisiblelink a:active {
position: absolute; width: 14em; left: 0.5em; border: solid #333 2px; color: #fff; background: #555;
}

Works for me. -Bill


All times are GMT -6. The time now is 08:48 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.