Skip to content

Instantly share code, notes, and snippets.

@kelsS
Created July 26, 2022 16:07
Show Gist options
  • Save kelsS/95e473f642fc698afdd22b17896623ba to your computer and use it in GitHub Desktop.
Save kelsS/95e473f642fc698afdd22b17896623ba to your computer and use it in GitHub Desktop.
Deque's visually-hidden class using the clip method in CSS. This allows you to place screen reader only text in the DOM.
.visually-hidden {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment