Customizer - Widgets: add feedback for screen readers when moving up or down. Props adamsilverstein, afercia. Fixes #28892.
Built from https://develop.svn.wordpress.org/trunk@30760 git-svn-id: http://core.svn.wordpress.org/trunk@30750 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
337dfe7111
commit
53d22ffb10
|
@ -118,6 +118,7 @@ do_action( 'customize_controls_print_scripts' );
|
||||||
<body class="<?php echo esc_attr( $body_class ); ?>">
|
<body class="<?php echo esc_attr( $body_class ); ?>">
|
||||||
<div class="wp-full-overlay expanded">
|
<div class="wp-full-overlay expanded">
|
||||||
<form id="customize-controls" class="wrap wp-full-overlay-sidebar">
|
<form id="customize-controls" class="wrap wp-full-overlay-sidebar">
|
||||||
|
<div id="screen-reader-messages" aria-live="polite" aria-relevant="all" aria-role="status" aria-atomic="true" class="screen-reader-text"></div>
|
||||||
|
|
||||||
<div id="customize-header-actions" class="wp-full-overlay-header">
|
<div id="customize-header-actions" class="wp-full-overlay-header">
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -671,8 +671,10 @@
|
||||||
|
|
||||||
if ( isMoveUp ) {
|
if ( isMoveUp ) {
|
||||||
self.moveUp();
|
self.moveUp();
|
||||||
|
$( '#screen-reader-messages' ).text( l10n.widgetMovedUp );
|
||||||
} else {
|
} else {
|
||||||
self.moveDown();
|
self.moveDown();
|
||||||
|
$( '#screen-reader-messages' ).text( l10n.widgetMovedDown );
|
||||||
}
|
}
|
||||||
|
|
||||||
$( this ).focus(); // re-focus after the container was moved
|
$( this ).focus(); // re-focus after the container was moved
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -728,6 +728,8 @@ final class WP_Customize_Widgets {
|
||||||
'removeBtnLabel' => __( 'Remove' ),
|
'removeBtnLabel' => __( 'Remove' ),
|
||||||
'removeBtnTooltip' => __( 'Trash widget by moving it to the inactive widgets sidebar.' ),
|
'removeBtnTooltip' => __( 'Trash widget by moving it to the inactive widgets sidebar.' ),
|
||||||
'error' => __( 'An error has occurred. Please reload the page and try again.' ),
|
'error' => __( 'An error has occurred. Please reload the page and try again.' ),
|
||||||
|
'widgetMovedUp' => __( 'Widget moved up' ),
|
||||||
|
'widgetMovedDown' => __( 'Widget moved down' ),
|
||||||
),
|
),
|
||||||
'tpl' => array(
|
'tpl' => array(
|
||||||
'widgetReorderNav' => $widget_reorder_nav_tpl,
|
'widgetReorderNav' => $widget_reorder_nav_tpl,
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.1-beta2-30759';
|
$wp_version = '4.1-beta2-30760';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue