nhsuk-frontend
nhsuk-frontend copied to clipboard
Announce whitespace in screen reader announcements of visually hidden text
This fixes a bug in the nhsuk-u-visually-hidden helper class where any whitespace surrounding visually hidden text isn't announced by screen readers.
This fix was added to govuk-frontend in pull request #3868 and released in v4.7.0 and has been re-applied here.
Thanks to @hannalaakso for the work upstream. 🙌
I’ve also followed the approach of the GOV.UK Design System team of adding a Typography page with examples of using visually-hidden text, to make testing easier.