Skip to content

Instantly share code, notes, and snippets.

@msikma
Created January 12, 2015 22:07
Show Gist options
  • Save msikma/b77dde412776eb630974 to your computer and use it in GitHub Desktop.
Save msikma/b77dde412776eb630974 to your computer and use it in GitHub Desktop.
CSS class to hide text for everything except screen readers
// 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