From b047890a254f3904f58cec1deabb8a244346eade Mon Sep 17 00:00:00 2001 From: laurelfulford Date: Mon, 31 Dec 2018 17:48:08 +0000 Subject: [PATCH] Twenty Nineteen: Improve menu semantics and keyboard navigation. The menu's original markup included some non-semantic tags and an unnecessary `tabindex` attribute that made it difficult to navigate via keyboard. Props allancole, anevins, kjellr. Fixes #45713. git-svn-id: https://develop.svn.wordpress.org/trunk@44376 602fd350-edb4-49c9-b593-d223f7449a82 --- .../twentynineteen/inc/template-functions.php | 22 +++++----- .../js/touch-keyboard-navigation.js | 6 ++- .../navigation/_menu-main-navigation.scss | 40 +++++++++++++++++++ .../themes/twentynineteen/style-rtl.css | 38 ++++++++++++++++++ .../themes/twentynineteen/style.css | 38 ++++++++++++++++++ .../template-parts/header/site-branding.php | 2 +- 6 files changed, 132 insertions(+), 14 deletions(-) diff --git a/src/wp-content/themes/twentynineteen/inc/template-functions.php b/src/wp-content/themes/twentynineteen/inc/template-functions.php index d7baff327c..2dbd0c5eba 100644 --- a/src/wp-content/themes/twentynineteen/inc/template-functions.php +++ b/src/wp-content/themes/twentynineteen/inc/template-functions.php @@ -203,18 +203,18 @@ function twentynineteen_add_ellipses_to_nav( $nav_menu, $args ) { if ( 'menu-1' === $args->theme_location ) : $nav_menu .= '