Ticket #60672: 60672.2.diff
File 60672.2.diff, 3.6 KB (added by , 5 months ago) |
---|
-
src/js/_enqueues/lib/nav-menu.js
455 455 depth = menuItem.menuItemDepth(), 456 456 isPrimaryMenuItem = ( 0 === depth ), 457 457 itemName = $this.closest( '.menu-item-handle' ).find( '.menu-item-title' ).text(), 458 menuItemType = $this.closest( '.menu-item-handle' ).find( '.item-controls' ).find( '.item-type' ).text(), 458 459 position = parseInt( menuItem.index(), 10 ), 459 460 prevItemDepth = ( isPrimaryMenuItem ) ? depth : parseInt( depth - 1, 10 ), 460 461 prevItemNameLeft = menuItem.prevAll('.menu-item-depth-' + prevItemDepth).first().find( '.menu-item-title' ).text(), … … 505 506 totalMenuItems = primaryItems.length, 506 507 507 508 // String together help text for primary menu items. 508 title = menus.menuFocus.replace( '%1$s', itemName ).replace( '%2$ d', itemPosition ).replace( '%3$d', totalMenuItems);509 title = menus.menuFocus.replace( '%1$s', itemName ).replace( '%2$s', menuItemType ); 509 510 } else { 510 511 parentItem = menuItem.prevAll( '.menu-item-depth-' + parseInt( depth - 1, 10 ) ).first(), 511 512 parentItemId = parentItem.find( '.menu-item-data-db-id' ).val(), … … 514 515 itemPosition = $( subItems.parents('.menu-item').get().reverse() ).index( menuItem ) + 1; 515 516 516 517 // String together help text for sub menu items. 517 title = menus.subMenuFocus.replace( '%1$s', itemName ).replace( '%2$ d', itemPosition ).replace( '%3$s', parentItemName );518 title = menus.subMenuFocus.replace( '%1$s', itemName ).replace( '%2$s', menuItemType ); 518 519 } 519 520 520 521 $this.attr( 'aria-label', title ); -
src/wp-admin/includes/class-walker-nav-menu-edit.php
182 182 '<a class="item-edit" id="edit-%s" href="%s" aria-label="%s"><span class="screen-reader-text">%s</span></a>', 183 183 $item_id, 184 184 esc_url( $edit_url ), 185 esc_attr__( 'Edit menu item ' ),185 esc_attr__( 'Edit menu item: ' . esc_html( $title ) . ' (' . esc_html( $menu_item->type_label ) . ')' ), 186 186 /* translators: Hidden accessibility text. */ 187 __( 'Edit ' )187 __( 'Edit menu item: ' . esc_html( $title ) . ' (' . esc_html( $menu_item->type_label ) . ')' ) 188 188 ); 189 189 ?> 190 190 </span> -
src/wp-admin/nav-menus.php
580 580 'under' => __( 'Under %s' ), 581 581 /* translators: %s: Previous item name. */ 582 582 'outFrom' => __( 'Out from under %s' ), 583 /* translators: 1: Item name, 2: Item position, 3: Total number of items. */584 'menuFocus' => __( ' %1$s. Menu item %2$d of %3$d.' ),585 /* translators: 1: Item name, 2: Item position, 3: Parent item name. */586 'subMenuFocus' => __( ' %1$s. Sub item number %2$d under %3$s.' ),583 /* translators: 1: Item name, 2: Item object type. */ 584 'menuFocus' => __( 'Edit menu item: %1$s (%2$s)' ), 585 /* translators: 1: Item name, 2: Item object type. */ 586 'subMenuFocus' => __( 'Edit menu item: %1$s (%2$s)' ), 587 587 /* translators: %s: Item name. */ 588 588 'menuItemDeletion' => __( 'item %s' ), 589 589 /* translators: %s: Item name. */