Admin menu: improve accessibility when collapsed.

Props afercia.
Fixes #32346.


git-svn-id: https://develop.svn.wordpress.org/trunk@32946 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2015-06-25 19:32:36 +00:00
parent 53bc964fc1
commit 9f5df5d045
2 changed files with 10 additions and 5 deletions

View File

@ -318,11 +318,15 @@
padding: 0; padding: 0;
} }
#adminmenu .wp-submenu-head, #adminmenu .wp-submenu-head {
.folded #adminmenu .wp-menu-name {
display: none; display: none;
} }
.folded #adminmenu .wp-menu-name {
position: absolute;
left: -999px;
}
.folded #adminmenu .wp-submenu-head { .folded #adminmenu .wp-submenu-head {
display: block; display: block;
} }
@ -678,7 +682,8 @@ li#wp-admin-bar-menu-toggle {
} }
.auto-fold #adminmenu .wp-menu-name { .auto-fold #adminmenu .wp-menu-name {
display: none; position: absolute;
left: -999px;
} }
.auto-fold #adminmenu .wp-submenu-head { .auto-fold #adminmenu .wp-submenu-head {
@ -797,7 +802,7 @@ li#wp-admin-bar-menu-toggle {
/* Restore the menu names */ /* Restore the menu names */
.auto-fold #adminmenu .wp-menu-name { .auto-fold #adminmenu .wp-menu-name {
display: block; position: static;
margin-left: 35px; margin-left: 35px;
} }

View File

@ -157,7 +157,7 @@ function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) {
if ( ! empty( $submenu_items ) ) { if ( ! empty( $submenu_items ) ) {
echo "\n\t<ul class='wp-submenu wp-submenu-wrap'>"; echo "\n\t<ul class='wp-submenu wp-submenu-wrap'>";
echo "<li class='wp-submenu-head'>{$item[0]}</li>"; echo "<li class='wp-submenu-head' aria-hidden='true'>{$item[0]}</li>";
$first = true; $first = true;