From 907d67572ad95e1a2df3ab3c64248527409e74d9 Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Mon, 10 Oct 2016 16:23:23 +0000 Subject: [PATCH] Accessibility: Improve the UI controls to move the Menu items. On the Menus screen, the links to move menu items behave like buttons: they perform an action so they should be real buttons to be correctly reported to assistive technologies. Since they're logically grouped controls, they should also be wrapped in a `
` element for better semantics and accessibility. Props Cheffheid. Fixes #35578. git-svn-id: https://develop.svn.wordpress.org/trunk@38770 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/css/nav-menus.css | 31 ++++++++++++++++++- .../includes/class-walker-nav-menu-edit.php | 18 +++++------ src/wp-admin/js/nav-menu.js | 7 ++--- 3 files changed, 41 insertions(+), 15 deletions(-) diff --git a/src/wp-admin/css/nav-menus.css b/src/wp-admin/css/nav-menus.css index b2916f2c7d..dd84fc5466 100644 --- a/src/wp-admin/css/nav-menus.css +++ b/src/wp-admin/css/nav-menus.css @@ -646,9 +646,38 @@ body.menu-max-depth-11 { min-width: 1280px !important; } box-shadow: 0 1px 1px rgba(0,0,0,0.04); } -.menu-item-settings .field-move a { +.menu-item-settings .field-move { + margin: 3px 0 5px; + line-height: 1.5; +} + +.field-move-visual-label { + float: left; + margin-right: 4px; + font-style: italic; +} + +.menu-item-settings .field-move .button-link { display: none; margin: 0 2px; + color: #0073aa; + font-style: italic; + text-decoration: underline; +} + +.menu-item-settings .field-move .button-link:hover, +.menu-item-settings .field-move .button-link:active { + color: #00a0d2; +} + +.menu-item-settings .field-move .button-link:focus { + color: #124964; + -webkit-box-shadow: + 0 0 0 1px #5b9dd9, + 0 0 2px 1px rgba(30, 140, 190, .8); + box-shadow: + 0 0 0 1px #5b9dd9, + 0 0 2px 1px rgba(30, 140, 190, .8); } .menu-item-edit-active .menu-item-settings { diff --git a/src/wp-admin/includes/class-walker-nav-menu-edit.php b/src/wp-admin/includes/class-walker-nav-menu-edit.php index 9a2f3ecb69..1f6857667e 100644 --- a/src/wp-admin/includes/class-walker-nav-menu-edit.php +++ b/src/wp-admin/includes/class-walker-nav-menu-edit.php @@ -197,16 +197,14 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu {

-

- -

+
+ + + + + + +