Customizer: Avoid duplicate IDs and remove role presentation from menu items reorder button. Follow-up to [33074].
props afercia. fixes #32725. git-svn-id: https://develop.svn.wordpress.org/trunk@33339 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
6da15e0528
commit
810ace4a5e
@ -2013,11 +2013,11 @@
|
||||
this.$sectionContent.sortable( this.isReordering ? 'disable' : 'enable' );
|
||||
if ( this.isReordering ) {
|
||||
addNewItemBtn.attr( 'tabindex', '-1' );
|
||||
reorderBtn.find( '.reorder-done' ).focus();
|
||||
reorderBtn.attr( 'aria-label', api.Menus.data.l10n.reorderLabelOff );
|
||||
wp.a11y.speak( api.Menus.data.l10n.reorderModeOn );
|
||||
} else {
|
||||
addNewItemBtn.removeAttr( 'tabindex' );
|
||||
reorderBtn.find( '.reorder' ).focus();
|
||||
reorderBtn.attr( 'aria-label', api.Menus.data.l10n.reorderLabelOn );
|
||||
wp.a11y.speak( api.Menus.data.l10n.reorderModeOff );
|
||||
}
|
||||
|
||||
|
@ -1574,11 +1574,11 @@ class WP_Customize_Nav_Menu_Control extends WP_Customize_Control {
|
||||
<button type="button" class="button-secondary add-new-menu-item" aria-label="<?php esc_attr_e( 'Add or remove menu items' ); ?>" aria-expanded="false" aria-controls="available-menu-items">
|
||||
<?php _e( 'Add Items' ); ?>
|
||||
</button>
|
||||
<button type="button" role="presentation" class="not-a-button reorder-toggle" tabindex="-1">
|
||||
<span class="reorder" tabindex="0" role="button" aria-label="<?php esc_attr_e( 'Reorder menu items' ); ?>" aria-describedby="reorder-items-desc"><?php _ex( 'Reorder', 'Reorder menu items in Customizer' ); ?></span>
|
||||
<span class="reorder-done" tabindex="0" role="button" aria-label="<?php esc_attr_e( 'Close reorder mode' ); ?>"><?php _ex( 'Done', 'Cancel reordering menu items in Customizer' ); ?></span>
|
||||
<button type="button" class="not-a-button reorder-toggle" aria-label="<?php esc_attr_e( 'Reorder menu items' ); ?>" aria-describedby="reorder-items-desc-{{ data.menu_id }}">
|
||||
<span class="reorder"><?php _ex( 'Reorder', 'Reorder menu items in Customizer' ); ?></span>
|
||||
<span class="reorder-done"><?php _ex( 'Done', 'Cancel reordering menu items in Customizer' ); ?></span>
|
||||
</button>
|
||||
<p class="screen-reader-text" id="reorder-items-desc"><?php _e( 'When in reorder mode, additional controls to reorder menu items will be available in the items list above.' ); ?></p>
|
||||
<p class="screen-reader-text" id="reorder-items-desc-{{ data.menu_id }}"><?php _e( 'When in reorder mode, additional controls to reorder menu items will be available in the items list above.' ); ?></p>
|
||||
<span class="add-menu-item-loading spinner"></span>
|
||||
<span class="menu-delete-item">
|
||||
<button type="button" class="not-a-button menu-delete">
|
||||
|
@ -336,6 +336,8 @@ final class WP_Customize_Nav_Menus {
|
||||
'itemsLoadingMore' => __( 'Loading more results... please wait.' ),
|
||||
'reorderModeOn' => __( 'Reorder mode enabled' ),
|
||||
'reorderModeOff' => __( 'Reorder mode closed' ),
|
||||
'reorderLabelOn' => esc_attr__( 'Reorder menu items' ),
|
||||
'reorderLabelOff' => esc_attr__( 'Close reorder mode' ),
|
||||
),
|
||||
'menuItemTransport' => 'postMessage',
|
||||
'phpIntMax' => PHP_INT_MAX,
|
||||
|
Loading…
Reference in New Issue
Block a user