Created
December 27, 2022 10:54
-
-
Save jaoltr/d3480abd846451e8c24487261318a0d3 to your computer and use it in GitHub Desktop.
CSS to visually hide elements while still accessible to screen readers
This file contains 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
.noShow { | |
border: 0; | |
clip: rect(0 0 0 0); | |
height: 1px; | |
margin: -1px; | |
overflow: hidden; | |
padding: 0; | |
position: absolute; | |
width: 1px; | |
} | |
/* https://www.w3.org/WAI/tutorials/forms/labels/ */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment