diff --git a/src/wp-admin/js/nav-menu.js b/src/wp-admin/js/nav-menu.js index b8bae1e747..07b2c37512 100644 --- a/src/wp-admin/js/nav-menu.js +++ b/src/wp-admin/js/nav-menu.js @@ -390,11 +390,11 @@ var wpNavMenu; // Refresh the accessibility when the user comes close to the item in any way menu.on( 'mouseenter.refreshAccessibility focus.refreshAccessibility touchstart.refreshAccessibility' , '.menu-item' , function(){ - api.refreshAdvancedAccessibilityOfItem( $( this ).find( '.item-edit' ) ); + api.refreshAdvancedAccessibilityOfItem( $( this ).find( 'a.item-edit' ) ); } ); // We have to update on click as well because we might hover first, change the item, and then click. - menu.on( 'click', '.item-edit', function() { + menu.on( 'click', 'a.item-edit', function() { api.refreshAdvancedAccessibilityOfItem( $( this ) ); } ); @@ -511,16 +511,16 @@ var wpNavMenu; $( '.menu-item-settings .field-move a' ).hide(); // Mark all menu items as unprocessed - $( '.item-edit' ).data( 'needs_accessibility_refresh', true ); + $( 'a.item-edit' ).data( 'needs_accessibility_refresh', true ); // All open items have to be refreshed or they will show no links - $( '.menu-item-edit-active .item-edit' ).each( function() { + $( '.menu-item-edit-active a.item-edit' ).each( function() { api.refreshAdvancedAccessibilityOfItem( this ); } ); }, refreshKeyboardAccessibility : function() { - $( '.item-edit' ).off( 'focus' ).on( 'focus', function(){ + $( 'a.item-edit' ).off( 'focus' ).on( 'focus', function(){ $(this).off( 'keydown' ).on( 'keydown', function(e){ var arrows,