Make WordPress Core


Ignore:
Timestamp:
06/03/2024 08:33:03 PM (4 months ago)
Author:
joedolson
Message:

Menus: Accessibility: Improve screen reader text for edit button.

Change the edit menu item toggle to communicate more context about the item to be edited. Make edit text consistent between Customizer menu editor and admin menu editor.

The menu position is conveyed only visually, using indentation, because there are no organizational semantics in either editor. This change helps provide screen reader users with consistent contextual information about the order, position, and parent of the current item.

Props joedolson, rcreators, afercia, mohonchandra.
Fixes #60673, See #60672.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/nav-menus.php

    r56600 r58306  
    581581    /* translators: %s: Previous item name. */
    582582    '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 type, 3: Item index, 4: Total items. */
     584    'menuFocus'               => __( 'Edit %1$s (%2$s, %3$d of %4$d)' ),
     585    /* translators: 1: Item name, 2: Item type, 3: Item index, 4: Total items, 5: Item parent. */
     586    'subMenuFocus'            => __( 'Edit %1$s (%2$s, sub-item %3$d of %4$d under %5$s)' ),
     587    /* translators: 1: Item name, 2: Item type, 3: Item index, 4: Total items, 5: Item parent, 6: Item depth. */
     588    'subMenuMoreDepthFocus'   => __( 'Edit %1$s (%2$s, sub-item %3$d of %4$d under %5$s, level %6$d)' ),
    587589    /* translators: %s: Item name. */
    588590    'menuItemDeletion'        => __( 'item %s' ),
Note: See TracChangeset for help on using the changeset viewer.