Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save About2git/4946407 to your computer and use it in GitHub Desktop.
Save About2git/4946407 to your computer and use it in GitHub Desktop.
CSS: Hide text for Screenreaders or hide visually but not for screenreaders
/* Hide for all Screenreaders http://www.456bereastreet.com/archive/200711/screen_readers_sometimes_ignore_displaynone/ */
.hidden {
display:none;
visibility:hidden;
}
/* Hide visually but read in Screenreaders http://webaim.org/techniques/css/invisiblecontent/ */
.screen-reader-text {
position:absolute;
left:-10000px;
top:auto;
width:1px;
height:1px;
overflow:hidden;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment