Admin menu: improve accessibility when collapsed.

Props afercia.
Fixes #32346.

Built from https://develop.svn.wordpress.org/trunk@32946


git-svn-id: http://core.svn.wordpress.org/trunk@32917 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2015-06-25 19:33:26 +00:00
parent 587c570efa
commit 2518b37222
6 changed files with 22 additions and 12 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;
right: -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;
right: -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-right: 35px; margin-right: 35px;
} }

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;
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

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;

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.3-alpha-32945'; $wp_version = '4.3-alpha-32946';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.