Skip to content
This repository has been archived by the owner on Dec 24, 2019. It is now read-only.

Commit

Permalink
Update visuallyhidden styles
Browse files Browse the repository at this point in the history
Noticed that the words were being read out of order in VoiceOver
and updated the CSS to the current recommendation in a similar
github issue.

Specifically, this comment:
https://github.com/h5bp/html5-boilerplate/issues/1985#issuecomment-394096182

For completeness, here is the updated class.

```
.visuallyhidden {
    border: 0;
    clip: rect(0 0 0 0);
    height: auto; /* new - was 1px */
    margin: 0; /* new - was -1px */
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    white-space: nowrap; /* 1 */
}
```
  • Loading branch information
pcraig3 committed Jun 12, 2018
1 parent c364148 commit d2f5c32
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions web/src/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@ export const focusRing = css`
export const visuallyhidden = css`
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
height: auto;
margin: 0;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
white-space: nowrap;
`

export const visuallyhiddenMobile = css`
Expand Down

0 comments on commit d2f5c32

Please sign in to comment.