WordPress.org

Make WordPress Core

Ticket #38397: 38397.2.patch

File 38397.2.patch, 786 bytes (added by davidakennedy, 4 years ago)

Adds aria-haspopup to links.

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

     
    2727                container.find( '.current-menu-ancestor > .sub-menu' ).addClass( 'toggled-on' );
    2828
    2929                // Add menu items with submenus to aria-haspopup="true".
    30                 container.find( '.menu-item-has-children, .page_item_has_children' ).attr( 'aria-haspopup', 'true' );
     30                container.find( '.menu-item-has-children > a, .page_item_has_children > a' ).attr( 'aria-haspopup', 'true' );
    3131
    3232                container.find( '.dropdown-toggle' ).click( function( e ) {
    3333                        var _this            = $( this ),