Make WordPress Core

Changeset 32848


Ignore:
Timestamp:
06/18/2015 08:51:48 PM (9 years ago)
Author:
ocean90
Message:

Customizer: Improve accessibility of Add Menu Items button and its panel.

props afercia, ocean90.
fixes #32682.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/customize-nav-menus.js

    r32824 r32848  
    18011801
    18021802                if ( ! $( 'body' ).hasClass( 'adding-menu-items' ) ) {
     1803                    $( this ).attr( 'aria-expanded', 'true' );
    18031804                    api.Menus.availableMenuItemsPanel.open( self );
    18041805                } else {
     1806                    $( this ).attr( 'aria-expanded', 'false' );
    18051807                    api.Menus.availableMenuItemsPanel.close();
    18061808                    event.stopPropagation();
  • trunk/src/wp-includes/class-wp-customize-control.php

    r32806 r32848  
    15391539    public function content_template() {
    15401540        ?>
    1541         <button type="button" class="button-secondary add-new-menu-item">
     1541        <button type="button" class="button-secondary add-new-menu-item" aria-expanded="false" aria-controls="available-menu-items">
    15421542            <?php _e( 'Add Items' ); ?>
    15431543        </button>
Note: See TracChangeset for help on using the changeset viewer.