Skip to content

Instantly share code, notes, and snippets.

@adamliptrot-oc
Created September 12, 2019 12:17
Show Gist options
  • Save adamliptrot-oc/8ab7a5daca427592271a8201b6374c51 to your computer and use it in GitHub Desktop.
Save adamliptrot-oc/8ab7a5daca427592271a8201b6374c51 to your computer and use it in GitHub Desktop.
Visually-hidden
/*
====================================
Work-around for issue on iOS VoiceOver with AFE version of visuallyhidden
https://github.com/hmrc/assets-frontend/issues/727
Also fixes issue with VO announcing hidden copy before visible copy
https://github.com/h5bp/main.css/issues/12
and fixes text running into itself on FF
https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
This brings the class into line with the latest release of GOV.UK Frontend
====================================
*/
.visually-hidden {
position: absolute;
width: 1px;
height: 1px;
margin: 0;
padding: 0;
overflow: hidden;
clip: rect(0 0 0 0);
clip-path: inset(50%);
-webkit-clip-path: inset(50%);
border: 0;
white-space: nowrap;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment