- 🇨🇦Canada mgifford Ottawa, Ontario
Seems like there is still partial support across the board https://caniuse.com/css-clip-path
From HTML5 Boilerplate
https://github.com/h5bp/main.css/blob/main/src/_helpers.css/* * Hide visually and from screen readers */ .hidden, [hidden] { display: none !important; } /* * Hide only visually, but have it available for screen readers: * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility * * 1. For long content, line feeds are not interpreted as spaces and small width * causes content to wrap 1 word per line: * https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe */ .visually-hidden { border: 0; clip: rect(0, 0, 0, 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; white-space: nowrap; width: 1px; /* 1 */ } /* * Extends the .visually-hidden class to allow the element * to be focusable when navigated to via the keyboard: * https://www.drupal.org/node/897638 */ .visually-hidden.focusable:active, .visually-hidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; white-space: inherit; width: auto; } /* * Hide visually and from screen readers, but maintain layout */ .invisible { visibility: hidden; }
- 🇨🇦Canada mgifford Ottawa, Ontario
Adding another example from the community - https://blog.logrocket.com/design-accessibility-css-visually-hidden-class/
Still no need to update as long as browser support clip[] at this point.