Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6755)

Unified Diff: chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm

Issue 2841963002: cocoa: fix a11y labeling & state on search icon (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/location_icon_decoration.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm b/chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm
index ec453049eccf37bdf61df9fe727c1a80030b3add..3aced3c88a788d8f7c94cc027ce96dcf626c428d 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm
@@ -102,7 +102,8 @@
}
bool LocationIconDecoration::AcceptsMousePress() {
- return true;
+ // The search icon does not accept mouse presses.
+ return !owner_->GetOmniboxView()->IsEditingOrEmpty();
}
bool LocationIconDecoration::HasHoverAndPressEffect() {
@@ -131,3 +132,9 @@
return owner_->GetOmniboxView()->IsEditingOrEmpty() ?
nil : l10n_util::GetNSStringWithFixup(IDS_TOOLTIP_LOCATION_ICON);
}
+
+NSString* LocationIconDecoration::GetAccessibilityLabel() {
+ // This button should always be labelled even when the omnibox is being
+ // edited.
+ return l10n_util::GetNSStringWithFixup(IDS_TOOLTIP_LOCATION_ICON);
+}
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/location_icon_decoration.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698