Skip to content

Commit

Permalink
Remove :hover and :active states on screen-reader-text
Browse files Browse the repository at this point in the history
We should consider removing all CSS rules that provide `:hover` and `:active` pseudo element behavior for `screen-reader-text` elements.

In IE 10/11, the `screen-reader-text` element, normally hidden, pops up when you hover your mouse over it, obscuring content — the Archives Widget drop-down menu is a good example.

According to the latest from the core a11y team: ​https://make.wordpress.org/accessibility/2015/02/09/hiding-text-for-screen-readers-with-wordpress-core/ -- we only need the `:focus` pseudo element class.

Props to @lancewillett for figuring this out.
  • Loading branch information
sixhours committed May 13, 2015
1 parent ce796e3 commit 67b2428
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -642,8 +642,6 @@ a:active {
overflow: hidden;
}

.screen-reader-text:hover,
.screen-reader-text:active,
.screen-reader-text:focus {
background-color: #f1f1f1;
border-radius: 3px;
Expand Down

0 comments on commit 67b2428

Please sign in to comment.