Accessibility: Improve the Dashboard Nearby Events widget wp.a11y.speak()
messages.
Avoids to announce the "city updated" message on page load. Fixes #42037. git-svn-id: https://develop.svn.wordpress.org/trunk@41682 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
93fc60f36a
commit
54153520f2
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user