From b1d4ec97750c356892999f14c43d836fa04de2c1 Mon Sep 17 00:00:00 2001 From: Braad Date: Mon, 13 Jul 2015 11:11:43 -0700 Subject: [PATCH] Add screen-reader-text class to our stylesheet for accessibility WordPress has been moving in the direction of better accessibility for themes, and as part of this they are encouraging the use of a standard class "screen-reader-text" on the front end of all themes. This change adds the official CSS recommended by core. For more information see https://make.wordpress.org/themes/2015/01/26/supporting-screen-reader-text/ and https://codex.wordpress.org/CSS#WordPress_Generated_Classes --- style.css | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/style.css b/style.css index a17c9de..5fa8df9 100755 --- a/style.css +++ b/style.css @@ -869,6 +869,35 @@ img.alignright, text-align: center; } +/* Text meant only for screen readers. */ +.screen-reader-text { + clip: rect(1px, 1px, 1px, 1px); + position: absolute !important; + height: 1px; + width: 1px; + overflow: hidden; +} + +.screen-reader-text:focus { + background-color: #f1f1f1; + border-radius: 3px; + box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6); + clip: auto !important; + color: #21759b; + display: block; + font-size: 14px; + font-size: 0.875rem; + font-weight: bold; + height: auto; + left: 5px; + line-height: normal; + padding: 15px 23px 14px; + text-decoration: none; + top: 5px; + width: auto; + z-index: 100000; /* Above WP toolbar. */ +} + /* Genesis --------------------------------------------- */