Skip to content

Instantly share code, notes, and snippets.

@IOZ
Created June 28, 2015 16:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IOZ/ff92223b83bfa5f45ea2 to your computer and use it in GitHub Desktop.
Save IOZ/ff92223b83bfa5f45ea2 to your computer and use it in GitHub Desktop.
ADA Code snippets
/* Hide only visually, but have it available for screenreaders: h5bp.com/v */
.visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
/* Extends the .visuallyhidden class to allow the element to be focusable when navigated to via the keyboard: h5bp.com/p */
.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment