Make WordPress Core

Changeset 57746

Timestamp:
03/01/2024 04:19:23 PM (5 months ago)
Author:
joedolson
Message:

Customize: Accessibility: Label menu subitems when updating menus.

Fix missing subitem indicator when menu items in the Customizer are children of parent menu items & add menu item original title to button text. Adds parity with the admin menu editor and fixes a bug where the button text was 'untitled' if the menu item title had not been edited.

Props designsimply, afercia, celloexpressions, kushang78, joedolson, rcreators.
Fixes #32728.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/wp/customize/nav-menus.js

    r50547 r57746  
    16651665            $reorderNav.find( '.menus-move-up, .menus-move-down, .menus-move-left, .menus-move-right' ).on( 'click', function() {
    16661666                var moveBtn = $( this );
     1667
     1668
    16671669                moveBtn.focus();
    16681670
     
    16781680                } else if ( isMoveLeft ) {
    16791681                    control.moveLeft();
     1682
     1683
     1684
     1685
     1686
    16801687                } else if ( isMoveRight ) {
    16811688                    control.moveRight();
     1689
     1690
     1691
     1692
     1693
     1694
    16821695                }
    16831696
  • trunk/src/wp-includes/customize/class-wp-customize-nav-menu-item-control.php

    r52580 r57746  
    7070                    <span class="spinner"></span>
    7171                    <span class="menu-item-title<# if ( ! data.title && ! data.original_title ) { #> no-title<# } #>">{{ data.title || data.original_title || wp.customize.Menus.data.l10n.untitled }}</span>
     72
     73
     74
     75
     76
    7277                </span>
    7378                <span class="item-controls">
     
    7580                    <?php
    7681                        /* translators: 1: Title of a menu item, 2: Type of a menu item. */
    77                         printf( __( 'Edit menu item: %1$s (%2$s)' ), '{{ data.title || wp.customize.Menus.data.l10n.untitled }}', '{{ data.item_type_label }}' );
     82                        printf( __( 'Edit menu item: %1$s (%2$s)' ), '{{ data.title || wp.customize.Menus.data.l10n.untitled }}', '{{ data.item_type_label }}' );
    7883                    ?>
    7984                    </span><span class="toggle-indicator" aria-hidden="true"></span></button>
     
    8186                    <?php
    8287                        /* translators: 1: Title of a menu item, 2: Type of a menu item. */
    83                         printf( __( 'Remove Menu Item: %1$s (%2$s)' ), '{{ data.title || wp.customize.Menus.data.l10n.untitled }}', '{{ data.item_type_label }}' );
     88                        printf( __( 'Remove Menu Item: %1$s (%2$s)' ), '{{ data.title || wp.customize.Menus.data.l10n.untitled }}', '{{ data.item_type_label }}' );
    8489                    ?>
    8590                    </span></button>
Note: See TracChangeset for help on using the changeset viewer.