Ticket #53840: 53840.2.diff
File 53840.2.diff, 2.4 KB (added by , 3 years ago) |
---|
-
src/js/_enqueues/lib/nav-menu.js
311 311 nextItemDepth = parseInt( nextItem.menuItemDepth(), 10 ) + 1, 312 312 prevItem = thisItem.prev(), 313 313 prevItemDepth = parseInt( prevItem.menuItemDepth(), 10 ), 314 prevItemId = prevItem.getItemData()['menu-item-db-id']; 314 prevItemId = prevItem.getItemData()['menu-item-db-id'], 315 a11ySpeech = menus[ 'moved' + dir.charAt(0).toUpperCase() + dir.slice(1) ]; 315 316 316 317 switch ( dir ) { 317 318 case 'up': … … 399 400 api.registerChange(); 400 401 api.refreshKeyboardAccessibility(); 401 402 api.refreshAdvancedAccessibility(); 403 404 if ( a11ySpeech ) { 405 wp.a11y.speak( a11ySpeech ); 406 } 402 407 }, 403 408 404 409 initAccessibility : function() { … … 1224 1229 $menuMarkup.hideAdvancedMenuItemFields().appendTo( api.targetList ); 1225 1230 api.refreshKeyboardAccessibility(); 1226 1231 api.refreshAdvancedAccessibility(); 1232 wp.a11y.speak( menus.itemAdded ); 1227 1233 $( document ).trigger( 'menu-item-added', [ $menuMarkup ] ); 1228 1234 }, 1229 1235 … … 1239 1245 $menuMarkup.hideAdvancedMenuItemFields().prependTo( api.targetList ); 1240 1246 api.refreshKeyboardAccessibility(); 1241 1247 api.refreshAdvancedAccessibility(); 1248 wp.a11y.speak( menus.itemAdded ); 1242 1249 $( document ).trigger( 'menu-item-added', [ $menuMarkup ] ); 1243 1250 }, 1244 1251 … … 1513 1520 ins.removeClass( 'menu-instructions-inactive' ); 1514 1521 } 1515 1522 api.refreshAdvancedAccessibility(); 1523 wp.a11y.speak( menus.itemRemoved ); 1516 1524 }); 1517 1525 }, 1518 1526 -
src/wp-admin/nav-menus.php
499 499 'menuItemDeletion' => __( 'item %s' ), 500 500 /* translators: %s: Item name. */ 501 501 'itemsDeleted' => __( 'Deleted menu item: %s.' ), 502 'itemAdded' => __( 'Menu item added' ), 503 'itemRemoved' => __( 'Menu item removed' ), 504 'movedUp' => __( 'Menu item moved up' ), 505 'movedDown' => __( 'Menu item moved down' ), 506 'movedTop' => __( 'Menu item moved to the top' ), 507 'movedLeft' => __( 'Menu item moved out of submenu' ), 508 'movedRight' => __( 'Menu item is now a sub-item' ), 502 509 ); 503 510 wp_localize_script( 'nav-menu', 'menus', $nav_menus_l10n ); 504 511