Customizer: Add widget title to Move/Up/Down controls to provide context for screen readers when reordering or moving widgets.
fixes #28889. Built from https://develop.svn.wordpress.org/trunk@29238 git-svn-id: http://core.svn.wordpress.org/trunk@29022 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
53d2839324
commit
9a02dabf34
|
@ -623,7 +623,9 @@
|
|||
* Handle clicks for up/down/move on the reorder nav
|
||||
*/
|
||||
$reorderNav = this.container.find( '.widget-reorder-nav' );
|
||||
$reorderNav.find( '.move-widget, .move-widget-down, .move-widget-up' ).on( 'click keypress', function( event ) {
|
||||
$reorderNav.find( '.move-widget, .move-widget-down, .move-widget-up' ).each( function() {
|
||||
$( this ).prepend( self.container.find( '.widget-title' ).text() + ': ' );
|
||||
} ).on( 'click keypress', function( event ) {
|
||||
if ( event.type === 'keypress' && ( event.which !== 13 && event.which !== 32 ) ) {
|
||||
return;
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue