Skip to content

Instantly share code, notes, and snippets.

@giuseppeg
Created December 30, 2012 10:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save giuseppeg/4412129 to your computer and use it in GitHub Desktop.
Save giuseppeg/4412129 to your computer and use it in GitHub Desktop.
tabindex fiddling
/**
* tabindex fiddling
*/
*:focus { border: 3px solid red }
body > a:first-child {
position: absolute;
top: auto;
left: -999%
}
body > a:first-child:focus {
position: static;
}
<a href="#content" tabindex="1">Skip to main content</a>
<header role="banner">
<h1>welcome</h1>
</header>
<nav role="navigation">
<a href="/foo">Foo</a>
</nav>
<div role="main" tabindex="2" id="content">
test <a hre="foo">ads</a>
</div>
<footer>
<p>&copy; Poo Inc.</p>
</footer>
// alert('Hello world!');
{"view":"separate","fontsize":"80","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment