From a740868552f6625efbd832499fd82bbd421e540a Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 19 Jul 2014 01:57:05 +0000 Subject: [PATCH] Customizer: Add widget title to Move/Up/Down controls to provide context for screen readers when reordering or moving widgets. fixes #28889. git-svn-id: https://develop.svn.wordpress.org/trunk@29238 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/js/customize-widgets.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/js/customize-widgets.js b/src/wp-admin/js/customize-widgets.js index e0d153fecd..ca15dba171 100644 --- a/src/wp-admin/js/customize-widgets.js +++ b/src/wp-admin/js/customize-widgets.js @@ -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; }