Customizer: Avoid duplicate IDs and remove role presentation from menu items reorder button. Follow-up to [33074].

props afercia.
fixes #32725.
Built from https://develop.svn.wordpress.org/trunk@33339


git-svn-id: http://core.svn.wordpress.org/trunk@33311 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2015-07-21 11:37:26 +00:00
parent 1ab119798c
commit 4dcfd3ec83
5 changed files with 11 additions and 9 deletions

View File

@ -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 );
}

File diff suppressed because one or more lines are too long

View File

@ -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">

View File

@ -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,

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.3-beta3-33338';
$wp_version = '4.3-beta3-33339';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.