Skip to content

Instantly share code, notes, and snippets.

@Andy-set-studio
Created November 1, 2019 14:28
Show Gist options
  • Save Andy-set-studio/0cdc8b99b283ba1976127b8c8d0871e6 to your computer and use it in GitHub Desktop.
Save Andy-set-studio/0cdc8b99b283ba1976127b8c8d0871e6 to your computer and use it in GitHub Desktop.
Button with visually hidden text
<button>
<span class="visually-hidden">Some text to announce</span>
<!-- your icon or whatever -->
</button>
.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