Skip to content

Instantly share code, notes, and snippets.

@anybodesign
Last active April 24, 2019 09:37
Show Gist options
  • Save anybodesign/972acf66b71cabf07b1630d719722bc8 to your computer and use it in GitHub Desktop.
Save anybodesign/972acf66b71cabf07b1630d719722bc8 to your computer and use it in GitHub Desktop.
Hide some text in an accessible way
.screen-reader-text {
position: absolute;
display: block;
width: 1px;
height: 1px;
padding: 0;
margin: 0;
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
}
@anybodesign
Copy link
Author

If you want to hide a label, for example. Add this class to any HTML tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment