Skip to content

Commit

Permalink
add .screen-reader-text CSS class using .visuallyhidden; update .visu…
Browse files Browse the repository at this point in the history
…allyhidden technique

This fixes #1528 and addresses part of #844
  • Loading branch information
benlk committed Sep 10, 2018
1 parent 8d325c4 commit 28efc0c
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 70 deletions.
12 changes: 7 additions & 5 deletions css/editor-style.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/editor-style.min.css

Large diffs are not rendered by default.

33 changes: 20 additions & 13 deletions css/style.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/style.min.css

Large diffs are not rendered by default.

39 changes: 1 addition & 38 deletions homepages/assets/css/single.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion homepages/assets/css/single.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions homepages/assets/css/top-stories.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion homepages/assets/css/top-stories.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions less/inc/footer.less
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ footer #boilerplate {
}
}

.screen-reader-text,
.back-to-top {
.visuallyhidden
}
16 changes: 11 additions & 5 deletions less/inc/mixins.less
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,18 @@
// CSS image replacement
// -------------------------
// Hide an item visually only
// https://make.wordpress.org/accessibility/2015/02/09/hiding-text-for-screen-readers-with-wordpress-core/
.visuallyhidden {
position: absolute;
overflow: hidden;
border: 0;
clip: rect(0 0 0 0);
height: 1px; width: 1px;
margin: -1px; padding: 0; border: 0;
clip-path: inset(50%);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute !important;
width: 1px;
word-wrap: normal !important;
}

// CSS image replacement
Expand Down Expand Up @@ -681,4 +687,4 @@
&:hover {
background-color: darken(@network, 5%);
}
}
}

0 comments on commit 28efc0c

Please sign in to comment.