Skip to content

Commit

Permalink
[bug 745888] Make skip-nav link tab-selectable.
Browse files Browse the repository at this point in the history
skiplink that has display:none is useless because it will never receive
focus. I also added a visual :focus state.
  • Loading branch information
icaaq authored and James Socol committed Apr 17, 2012
1 parent 347436e commit 4f40a35
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
17 changes: 17 additions & 0 deletions media/css/base.css
Expand Up @@ -30,6 +30,23 @@ body {
font:16px/24px Georgia, serif;
}

.skip{
left:-999em;
position:absolute;
}

.skip:focus{
background:rgb(255,255,255);
color:rgb(44,44,44);
height:35px;
left:0;
padding-top:5px;
right:0;
text-align:center;
top:0;
z-index:1031; /* One more than .nav-bar-fixed-top */
}

.huge,.large,h1,h2,h3,h4 {
font-family:OpenSans, "Lucida Sans", "Lucida Grande", "Lucida Sans Unicode", Verdana, sans-serif;
font-weight:400;
Expand Down
4 changes: 1 addition & 3 deletions templates/base.html
Expand Up @@ -30,9 +30,7 @@
{{ 'auth' if user.is_authenticated() else 'anon' }}"
data-locale="{{ LANG }}">

<ul id="skip" class="hide">
<li><a href="#main">{{ _('Skip to Content') }}</a></li>
</ul>
<a class="skip" href="#main">{{ _('Skip to Content') }}</a>
{% block nav %}
<nav class="navbar navbar-fixed-top">
<div class="navbar-inner">
Expand Down

0 comments on commit 4f40a35

Please sign in to comment.