Commit c4e242bd authored by Chris Rebert's avatar Chris Rebert
Browse files

add .sr-only-focusable; fixes #12259

parent 651b289e
Showing with 25 additions and 0 deletions
+25 -0
...@@ -346,6 +346,15 @@ hr { ...@@ -346,6 +346,15 @@ hr {
clip: rect(0, 0, 0, 0); clip: rect(0, 0, 0, 0);
border: 0; border: 0;
} }
.sr-only-focusable:active,
.sr-only-focusable:focus {
position: static;
width: auto;
height: auto;
margin: 0;
overflow: visible;
clip: auto;
}
h1, h1,
h2, h2,
h3, h3,
......
...@@ -132,3 +132,19 @@ hr { ...@@ -132,3 +132,19 @@ hr {
clip: rect(0,0,0,0); clip: rect(0,0,0,0);
border: 0; border: 0;
} }
// Use in conjunction with .sr-only to only display content when it's focused.
// Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1
// Credit: HTML5 Boilerplate
.sr-only-focusable {
&:active,
&:focus {
position: static;
width: auto;
height: auto;
margin: 0;
overflow: visible;
clip: auto;
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment