From 8a6fa93b84aeb88c06f075750f330a7a59619392 Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Sat, 5 Nov 2016 16:27:13 +0000 Subject: [PATCH] Accessibility: Revert [38984] as it needs to be better communicated to plugin authors. See #37513. git-svn-id: https://develop.svn.wordpress.org/trunk@39147 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-admin-bar.php | 15 ++++----------- src/wp-includes/css/admin-bar.css | 10 ++++------ 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/src/wp-includes/class-wp-admin-bar.php b/src/wp-includes/class-wp-admin-bar.php index b0a5e5d733..49986ac225 100644 --- a/src/wp-includes/class-wp-admin-bar.php +++ b/src/wp-includes/class-wp-admin-bar.php @@ -474,27 +474,20 @@ class WP_Admin_Bar { if ( $node->type != 'item' ) return; - $is_parent = ! empty( $node->children ); - $has_link = ! empty( $node->href ); - $is_root_top_item = 'root-default' === $node->parent; - $is_top_secondary_item = 'top-secondary' === $node->parent; + $is_parent = ! empty( $node->children ); + $has_link = ! empty( $node->href ); // Allow only numeric values, then casted to integers, and allow a tabindex value of `0` for a11y. $tabindex = ( isset( $node->meta['tabindex'] ) && is_numeric( $node->meta['tabindex'] ) ) ? (int) $node->meta['tabindex'] : ''; $aria_attributes = ( '' !== $tabindex ) ? ' tabindex="' . $tabindex . '"' : ''; - $menuclass = $arrow_right = ''; + $menuclass = ''; if ( $is_parent ) { $menuclass = 'menupop '; $aria_attributes .= ' aria-haspopup="true"'; } - // Print the right arrow icon for the primary menu children with children. - if ( ! $is_root_top_item && ! $is_top_secondary_item && $is_parent ) { - $arrow_right = ''; - } - if ( ! empty( $node->meta['class'] ) ) $menuclass .= $node->meta['class']; @@ -539,7 +532,7 @@ class WP_Admin_Bar { ?>>title; + echo $node->title; if ( $has_link ) : ?> #wp-toolbar > #wp-admin-bar-root-default .ab-icon, #wpadminbar .ab-icon, -#wpadminbar .ab-item:before, -.wp-admin-bar-arrow-right { +#wpadminbar .ab-item:before { position: relative; float: left; font: normal 20px/1 dashicons; @@ -313,7 +312,7 @@ html:lang(he-il) .rtl #wpadminbar * { color: #00b9eb; } -#wpadminbar .menupop .menupop > .ab-item .wp-admin-bar-arrow-right:before, +#wpadminbar .menupop .menupop > .ab-item:before, #wpadminbar .ab-top-secondary .menupop .menupop > .ab-item:before { position: absolute; font: normal 17px/1 dashicons; @@ -327,10 +326,9 @@ html:lang(he-il) .rtl #wpadminbar * { padding-right: 2em; } -#wpadminbar .menupop .menupop > .ab-item .wp-admin-bar-arrow-right:before { +#wpadminbar .menupop .menupop > .ab-item:before { top: 1px; - right: 10px; - padding: 4px 0; + right: 4px; content: "\f139"; color: inherit; }