Ticket #26639: 26639.2.diff
File 26639.2.diff, 1.9 KB (added by , 11 years ago) |
---|
-
src/wp-admin/js/common.js
557 557 $( '#wp-admin-bar-menu-toggle' ).on( 'click.wp-responsive', function( event ) { 558 558 event.preventDefault(); 559 559 $wpwrap.toggleClass( 'wp-responsive-open' ); 560 if ( $wpwrap.hasClass( 'wp-responsive-open' ) ) { 561 event.target.setAttribute( 'aria-expanded', 'true' ); 562 $( '#adminmenu a:first' ).focus(); 563 } else { 564 event.target.setAttribute( 'aria-expanded', 'false' ); 565 } 560 566 } ); 561 567 562 568 // Add menu events -
src/wp-includes/admin-bar.php
166 166 if ( is_admin() ) { 167 167 $wp_admin_bar->add_menu( array( 168 168 'id' => 'menu-toggle', 169 'title' => '<span class="ab-icon" ></span>',169 'title' => '<span class="ab-icon" aria-hidden="true"></span><span class="screen-reader-text">' . __( 'Menu' ) . '</span>', 170 170 'href' => '#', 171 171 'meta' => array( 172 ' title' => __( 'Menu' ),172 'expandable' => true, 173 173 ), 174 174 ) ); 175 175 } -
src/wp-includes/class-wp-admin-bar.php
409 409 $has_link = ! empty( $node->href ); 410 410 411 411 $tabindex = isset( $node->meta['tabindex'] ) ? (int) $node->meta['tabindex'] : ''; 412 $expandable = isset( $node->meta['expandable'] ) ? (bool) $node->meta['expandable'] : false; 413 412 414 $aria_attributes = $tabindex ? 'tabindex="' . $tabindex . '"' : ''; 415 if ( $expandable ) { 416 $aria_attributes .= ' aria-expanded="false"'; 417 } 413 418 414 419 $menuclass = ''; 415 420