Skip to content

Commit

Permalink
Merge pull request #1109 from alphagov/update-visually-hidden-text-class
Browse files Browse the repository at this point in the history
Update visually hidden class to fix ordering issue in VoiceOver OSX
  • Loading branch information
NickColley committed Jan 9, 2019
2 parents ac5c683 + 376bf53 commit 65372fb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@

([PR #N](https://github.com/alphagov/govuk-frontend/pull/N))

- Update visually hidden class to fix ordering issue in VoiceOver OSX

We have fixed an issue in VoiceOver OSX where using the `govuk-visually-hidden` class in links would result in the text being announced out of order.

We also now recommend to use aria-label or aria-labelledby where appropriate.

([PR #1109](https://github.com/alphagov/govuk-frontend/pull/1109))

## 2.4.1 (fix release)

🔧 Fixes:
Expand Down
6 changes: 4 additions & 2 deletions src/helpers/_visually-hidden.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@

width: 1px iff($important, !important);
height: 1px iff($important, !important);
margin: -1px iff($important, !important);
// If margin is set to a negative value it can cause text to be announced in the wrong order in VoiceOver for OSX
margin: 0 iff($important, !important);
padding: 0 iff($important, !important);

overflow: hidden iff($important, !important);
Expand Down Expand Up @@ -49,7 +50,8 @@

width: 1px iff($important, !important);
height: 1px iff($important, !important);
margin: -1px iff($important, !important);
// If margin is set to a negative value it can cause text to be announced in the wrong order in VoiceOver for OSX
margin: 0 iff($important, !important);

overflow: hidden iff($important, !important);
clip: rect(0 0 0 0) iff($important, !important);
Expand Down

0 comments on commit 65372fb

Please sign in to comment.