Skip to content

Instantly share code, notes, and snippets.

@krry
Last active April 7, 2019 00:17
Show Gist options
  • Save krry/ab78c04d0bc112cbc66dfd987f833aed to your computer and use it in GitHub Desktop.
Save krry/ab78c04d0bc112cbc66dfd987f833aed to your computer and use it in GitHub Desktop.
Helper classes for building inclusive, accessible interfaces/experiences
/* from
https://inclusive-components.design/tooltips-toggletips/
"The visually-hidden class corresponds to some special CSS we've discussed before on Inclusive Components.
It hides the <span> visually without stopping it from being read out in screen readers."
*/
.visually-hidden {
clip-path: inset(100%);
clip: rect(1px, 1px, 1px, 1px);
height: 1px;
overflow: hidden;
position: absolute;
white-space: nowrap;
width: 1px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment