WordPress.org

Make WordPress Core

Ticket #38397: 38397.3.patch

File 38397.3.patch, 804 bytes (added by davidakennedy, 5 years ago)

Removes aria-haspopup attribute for menu items with sub-menus.

  • src/wp-content/themes/twentyseventeen/assets/js/navigation.js

     
    2121                container.find( '.current-menu-ancestor > button' ).addClass( 'toggled-on' );
    2222                container.find( '.current-menu-ancestor > .sub-menu' ).addClass( 'toggled-on' );
    2323
    24                 // Add menu items with submenus to aria-haspopup="true".
    25                 container.find( '.menu-item-has-children, .page_item_has_children' ).attr( 'aria-haspopup', 'true' );
    26 
    2724                container.find( '.dropdown-toggle' ).click( function( e ) {
    2825                        var _this = $( this ),
    2926                                screenReaderSpan = _this.find( '.screen-reader-text' );