From ab929718176eab321b2b5d7b4f4fbaa7208dfefc Mon Sep 17 00:00:00 2001 From: Lance Willett Date: Tue, 18 Mar 2014 22:37:15 +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. Built from https://develop.svn.wordpress.org/trunk@27594 git-svn-id: http://core.svn.wordpress.org/trunk@27437 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-content/themes/twentyfourteen/header.php | 2 +- wp-content/themes/twentyfourteen/style.css | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/wp-content/themes/twentyfourteen/header.php b/wp-content/themes/twentyfourteen/header.php index d6c8fc4e7a..3cd56649f2 100644 --- a/wp-content/themes/twentyfourteen/header.php +++ b/wp-content/themes/twentyfourteen/header.php @@ -49,7 +49,7 @@ diff --git a/wp-content/themes/twentyfourteen/style.css b/wp-content/themes/twentyfourteen/style.css index f4f8ff39d9..3d60975b48 100644 --- a/wp-content/themes/twentyfourteen/style.css +++ b/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