Created
January 12, 2015 22:07
-
-
Save msikma/b77dde412776eb630974 to your computer and use it in GitHub Desktop.
CSS class to hide text for everything except screen readers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Class to hide something except on aural browsers/screen readers. | |
// Just setting display: none does not work, since then it hides the item | |
// on aural browsers too. | |
// This set of attributes appear to have good results, but feedback | |
// from users of screen readers is always appreciated. | |
.aural-only { | |
height: 1px; | |
margin: -1px; | |
clip: rect(0px, 0px, 0px, 0px); | |
border: none; | |
overflow: hidden; | |
padding: 0; | |
position: absolute; | |
width: 1px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment