Created
November 1, 2019 14:28
-
-
Save Andy-set-studio/0cdc8b99b283ba1976127b8c8d0871e6 to your computer and use it in GitHub Desktop.
Button with visually hidden text
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
<button> | |
<span class="visually-hidden">Some text to announce</span> | |
<!-- your icon or whatever --> | |
</button> |
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
.visually-hidden { | |
border: 0; | |
clip: rect(0 0 0 0); | |
height: auto; | |
margin: 0; | |
overflow: hidden; | |
padding: 0; | |
position: absolute; | |
width: 1px; | |
white-space: nowrap; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment