Accessibility: Improve the Dashboard Nearby Events widget wp.a11y.speak() messages.

Avoids to announce the "city updated" message on page load.

Fixes #42037.

Built from https://develop.svn.wordpress.org/trunk@41682


git-svn-id: http://core.svn.wordpress.org/trunk@41516 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrea Fercia 2017-10-02 19:25:45 +00:00
parent 3dda9e9257
commit c56dbad284
3 changed files with 6 additions and 3 deletions

View File

@ -425,7 +425,10 @@ jQuery( function( $ ) {
template = wp.template( 'community-events-no-upcoming-events' );
$results.html( template( templateParams ) );
}
wp.a11y.speak( communityEventsData.l10n.city_updated.replace( l10nPlaceholder, templateParams.location.description ), 'assertive' );
if ( 'user' === initiatedBy ) {
wp.a11y.speak( communityEventsData.l10n.city_updated.replace( l10nPlaceholder, templateParams.location.description ), 'assertive' );
}
elementVisibility['#community-events-location-message'] = true;
elementVisibility['.community-events-toggle-location'] = true;

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9-alpha-41681';
$wp_version = '4.9-alpha-41682';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.