Widgets: Use a text-based button to select location.

The WordPress Events and News widget used an icon-only button to select a location. The Pencil icon alone provided insufficient context and labeling for accessibility. Add text to clearly describe button action and change icon to represent a location marker. 

Props AmethystAnswers, sabernhardt.
Fixes #53311.

git-svn-id: https://develop.svn.wordpress.org/trunk@51971 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Joe Dolson 2021-11-01 22:53:19 +00:00
parent d9bb269a31
commit 93b2e8d9a6
2 changed files with 4 additions and 3 deletions

View File

@ -354,7 +354,7 @@
.community-events-errors [aria-hidden="true"],
.community-events-loading[aria-hidden="true"],
.community-events[aria-hidden="true"],
.community-events [aria-hidden="true"] {
.community-events form[aria-hidden="true"] {
display: none;
}

View File

@ -1350,8 +1350,9 @@ function wp_print_community_events_markup() {
<p>
<span id="community-events-location-message"></span>
<button class="button-link community-events-toggle-location" aria-label="<?php esc_attr_e( 'Edit city' ); ?>" aria-expanded="false">
<span class="dashicons dashicons-edit"></span>
<button class="button-link community-events-toggle-location" aria-expanded="false">
<span class="dashicons dashicons-location" aria-hidden="true"></span>
<span class="community-events-location-edit"><?php _e( 'Select location' ); ?></span>
</button>
</p>