Skip to content

Instantly share code, notes, and snippets.

@carlos-sanchez
Created November 14, 2013 03:03
Show Gist options
  • Save carlos-sanchez/7460633 to your computer and use it in GitHub Desktop.
Save carlos-sanchez/7460633 to your computer and use it in GitHub Desktop.
Hidden but accesible. Setting display: none hides content for screen readers and search engine bots. This is the difference that really matters. When you’re making tabs or playing with slideToggle(), don’t hide the content with display: none because you will make it unavailable for both, screen readers and search bots. Instead give it the previo…
.visuallyhidden {
position: absolute;
width: 1px; /* Setting this to 0 make it invisible for VoiceOver */
height: 1px; /* Setting this to 0 make it invisible for VoiceOver */
padding: 0;
margin: -1px;
border: 0;
clip: rect(0 0 0 0);
overflow: hidden;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment