Accessibility: Revert [38984] as it needs to be better communicated to plugin authors.

See #37513.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrea Fercia 2016-11-05 16:28:33 +00:00
parent 4c5f80c839
commit 7b3445c312
6 changed files with 15 additions and 26 deletions

View File

@ -474,27 +474,20 @@ class WP_Admin_Bar {
if ( $node->type != 'item' ) if ( $node->type != 'item' )
return; return;
$is_parent = ! empty( $node->children ); $is_parent = ! empty( $node->children );
$has_link = ! empty( $node->href ); $has_link = ! empty( $node->href );
$is_root_top_item = 'root-default' === $node->parent;
$is_top_secondary_item = 'top-secondary' === $node->parent;
// Allow only numeric values, then casted to integers, and allow a tabindex value of `0` for a11y. // 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'] : ''; $tabindex = ( isset( $node->meta['tabindex'] ) && is_numeric( $node->meta['tabindex'] ) ) ? (int) $node->meta['tabindex'] : '';
$aria_attributes = ( '' !== $tabindex ) ? ' tabindex="' . $tabindex . '"' : ''; $aria_attributes = ( '' !== $tabindex ) ? ' tabindex="' . $tabindex . '"' : '';
$menuclass = $arrow_right = ''; $menuclass = '';
if ( $is_parent ) { if ( $is_parent ) {
$menuclass = 'menupop '; $menuclass = 'menupop ';
$aria_attributes .= ' aria-haspopup="true"'; $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 = '<span class="wp-admin-bar-arrow-right" aria-hidden="true"></span>';
}
if ( ! empty( $node->meta['class'] ) ) if ( ! empty( $node->meta['class'] ) )
$menuclass .= $node->meta['class']; $menuclass .= $node->meta['class'];
@ -539,7 +532,7 @@ class WP_Admin_Bar {
?>><?php ?>><?php
endif; endif;
echo $arrow_right . $node->title; echo $node->title;
if ( $has_link ) : if ( $has_link ) :
?></a><?php ?></a><?php

View File

@ -234,8 +234,7 @@ html:lang(he-il) .rtl #wpadminbar * {
#wpadminbar > #wp-toolbar > #wp-admin-bar-root-default .ab-icon, #wpadminbar > #wp-toolbar > #wp-admin-bar-root-default .ab-icon,
#wpadminbar .ab-icon, #wpadminbar .ab-icon,
#wpadminbar .ab-item:before, #wpadminbar .ab-item:before {
.wp-admin-bar-arrow-right {
position: relative; position: relative;
float: right; float: right;
font: normal 20px/1 dashicons; font: normal 20px/1 dashicons;
@ -313,7 +312,7 @@ html:lang(he-il) .rtl #wpadminbar * {
color: #00b9eb; 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 { #wpadminbar .ab-top-secondary .menupop .menupop > .ab-item:before {
position: absolute; position: absolute;
font: normal 17px/1 dashicons; font: normal 17px/1 dashicons;
@ -327,10 +326,9 @@ html:lang(he-il) .rtl #wpadminbar * {
padding-left: 2em; padding-left: 2em;
} }
#wpadminbar .menupop .menupop > .ab-item .wp-admin-bar-arrow-right:before { #wpadminbar .menupop .menupop > .ab-item:before {
top: 1px; top: 1px;
left: 10px; left: 4px;
padding: 4px 0;
content: "\f141"; content: "\f141";
color: inherit; color: inherit;
} }

File diff suppressed because one or more lines are too long

View File

@ -234,8 +234,7 @@ html:lang(he-il) .rtl #wpadminbar * {
#wpadminbar > #wp-toolbar > #wp-admin-bar-root-default .ab-icon, #wpadminbar > #wp-toolbar > #wp-admin-bar-root-default .ab-icon,
#wpadminbar .ab-icon, #wpadminbar .ab-icon,
#wpadminbar .ab-item:before, #wpadminbar .ab-item:before {
.wp-admin-bar-arrow-right {
position: relative; position: relative;
float: left; float: left;
font: normal 20px/1 dashicons; font: normal 20px/1 dashicons;
@ -313,7 +312,7 @@ html:lang(he-il) .rtl #wpadminbar * {
color: #00b9eb; 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 { #wpadminbar .ab-top-secondary .menupop .menupop > .ab-item:before {
position: absolute; position: absolute;
font: normal 17px/1 dashicons; font: normal 17px/1 dashicons;
@ -327,10 +326,9 @@ html:lang(he-il) .rtl #wpadminbar * {
padding-right: 2em; padding-right: 2em;
} }
#wpadminbar .menupop .menupop > .ab-item .wp-admin-bar-arrow-right:before { #wpadminbar .menupop .menupop > .ab-item:before {
top: 1px; top: 1px;
right: 10px; right: 4px;
padding: 4px 0;
content: "\f139"; content: "\f139";
color: inherit; color: inherit;
} }

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.7-beta2-39146'; $wp_version = '4.7-beta2-39147';
/** /**
* 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.