mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
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
This commit is contained in:
@@ -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 = '<span class="wp-admin-bar-arrow-right" aria-hidden="true"></span>';
|
||||
}
|
||||
|
||||
if ( ! empty( $node->meta['class'] ) )
|
||||
$menuclass .= $node->meta['class'];
|
||||
|
||||
@@ -539,7 +532,7 @@ class WP_Admin_Bar {
|
||||
?>><?php
|
||||
endif;
|
||||
|
||||
echo $arrow_right . $node->title;
|
||||
echo $node->title;
|
||||
|
||||
if ( $has_link ) :
|
||||
?></a><?php
|
||||
|
||||
Reference in New Issue
Block a user