Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip link for keyboard/screen reader navigation #859

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ a:focus { outline: thin dotted; }
/* Improve readability when focused and hovered in all browsers: h5bp.com/h */
a:hover, a:active { outline: 0; }

/* Skip Nav Link - this is hidden by default and shows up at the top, center if focused - more info at http://bit.ly/sOGGbb and http://bit.ly/sKG7PL */
#skip a, #skip a:hover, #skip a:visited { position:absolute; left:-9999px; top:0px; width:1px; height:1px; overflow:hidden; z-index: 9999; text-align: center; }
#skip a:active, #skip a:focus { position:absolute; left:50%; margin-left: -80px; width:160px; height:auto; }

/* =============================================================================
Typography
Expand Down
7 changes: 6 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,15 @@
</head>

<body>
<!-- skip link for keyboard or screen reader navigation, skips to content. Adjust the id as needed for appropriate linking
more info at http://bit.ly/sOGGbb and http://bit.ly/sKG7PL -->
<div id="skip">
<a href="#content">Skip to Main Content</a>
</div>
<header>

</header>
<div role="main">
<div role="main" id="content">

</div>
<footer>
Expand Down