From ce258405606d7c8551466d659a78136770d47bd1 Mon Sep 17 00:00:00 2001 From: Lance Willett Date: Tue, 18 Mar 2014 22:36:12 +0000 Subject: [PATCH] Twenty Fourteen: make small-screen menu accessible to keyboard commands and voice-driven software by using a focusable `button` element rather than `h1` for the toggle element. Fixes #27147, props jartes and joedolson. git-svn-id: https://develop.svn.wordpress.org/trunk@27594 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-content/themes/twentyfourteen/header.php | 2 +- src/wp-content/themes/twentyfourteen/style.css | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/wp-content/themes/twentyfourteen/header.php b/src/wp-content/themes/twentyfourteen/header.php index d6c8fc4e7a..3cd56649f2 100644 --- a/src/wp-content/themes/twentyfourteen/header.php +++ b/src/wp-content/themes/twentyfourteen/header.php @@ -49,7 +49,7 @@ diff --git a/src/wp-content/themes/twentyfourteen/style.css b/src/wp-content/themes/twentyfourteen/style.css index f4f8ff39d9..3d60975b48 100644 --- a/src/wp-content/themes/twentyfourteen/style.css +++ b/src/wp-content/themes/twentyfourteen/style.css @@ -820,7 +820,7 @@ span + .edit-link:before, */ /* Ensure that there is no gap between the header and - the admin bar for WordPress versions before 3.8. */ + the admin bar for WordPress versions before 3.8. */ #wpadminbar { min-height: 32px; } @@ -986,11 +986,14 @@ span + .edit-link:before, } .menu-toggle { + background-color: #000; + border-radius: 0; cursor: pointer; font-size: 0; height: 48px; margin: 0; overflow: hidden; + padding: 0; position: absolute; top: 0; right: 0; @@ -1001,9 +1004,20 @@ span + .edit-link:before, .menu-toggle:before { color: #fff; content: "\f419"; + display: inline; margin-top: 16px; } +.menu-toggle:active, +.menu-toggle:focus, +.menu-toggle:hover { + background-color: #444; +} + +.menu-toggle:focus { + outline: 1px dotted; +} + /** * 6.0 Content