Commit a216a5e5 authored by Kevin Bailey's avatar Kevin Bailey Committed by Commit Bot

[omnibox] Add name to icon for accessibility description

MacOS is capable of generating an accessibility description for the
search icon on the Omnibox, but we currently don't fill it in. This
CL adds a name to it (and there may be a follow-up to tweak the
"image" string that is also getting appended.)

Bug: 862745
Change-Id: I53f7250c848761127a29bdad4e215830c365bb97
Reviewed-on: https://chromium-review.googlesource.com/1138548Reviewed-by: default avatarJustin Donnelly <jdonnelly@chromium.org>
Commit-Queue: Kevin Bailey <krb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576184}
parent 25448d6a
...@@ -80,7 +80,8 @@ bool LocationIconView::ShowBubble(const ui::Event& event) { ...@@ -80,7 +80,8 @@ bool LocationIconView::ShowBubble(const ui::Event& event) {
void LocationIconView::GetAccessibleNodeData(ui::AXNodeData* node_data) { void LocationIconView::GetAccessibleNodeData(ui::AXNodeData* node_data) {
if (location_bar_->GetOmniboxView()->IsEditingOrEmpty()) { if (location_bar_->GetOmniboxView()->IsEditingOrEmpty()) {
node_data->role = ax::mojom::Role::kNone; node_data->role = ax::mojom::Role::kImage;
node_data->SetName(l10n_util::GetStringUTF8(IDS_ACC_SEARCH_ICON));
return; return;
} }
......
...@@ -83,6 +83,9 @@ ...@@ -83,6 +83,9 @@
<message name="IDS_ACC_AUTOCOMPLETE_CLIPBOARD" desc="Text for screenreaders describing a URL from a clipboard."> <message name="IDS_ACC_AUTOCOMPLETE_CLIPBOARD" desc="Text for screenreaders describing a URL from a clipboard.">
<ph name="LOCATION_TITLE">$2<ex>The Chromium Projects</ex></ph> <ph name="SHORT_URL">$1<ex>www.chromium.org</ex> location from clipboard</ph> <ph name="LOCATION_TITLE">$2<ex>The Chromium Projects</ex></ph> <ph name="SHORT_URL">$1<ex>www.chromium.org</ex> location from clipboard</ph>
</message> </message>
<message name="IDS_ACC_SEARCH_ICON" desc="Text for screenreaders describing a search icon image.">
Search icon
</message>
<!-- Supplement accessibility label with item position, e.g. "1 of 3" --> <!-- Supplement accessibility label with item position, e.g. "1 of 3" -->
<message name="IDS_ACC_AUTOCOMPLETE_N_OF_M" desc="Text for screenreaders describing the current matche's position in the list of suggestions."> <message name="IDS_ACC_AUTOCOMPLETE_N_OF_M" desc="Text for screenreaders describing the current matche's position in the list of suggestions.">
<ph name="FRIENDLY_MATCH_TEXT">$1<ex>The Chromium Projects http://www.chromium.org bookmark</ex></ph>, <ph name="MATCH_POSITION">$2<ex>2</ex></ph> of <ph name="NUM_MATCHES">$3<ex>3</ex></ph> <ph name="FRIENDLY_MATCH_TEXT">$1<ex>The Chromium Projects http://www.chromium.org bookmark</ex></ph>, <ph name="MATCH_POSITION">$2<ex>2</ex></ph> of <ph name="NUM_MATCHES">$3<ex>3</ex></ph>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment