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

Unified Diff: chrome/browser/ui/cocoa/global_error_bubble_controller.mm

Issue 2585953002: [UI Cocoa] Hide the global error bubble icon from accessibility (Closed)
Patch Set: . Created 4 years 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 | « no previous file | chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/global_error_bubble_controller.mm
diff --git a/chrome/browser/ui/cocoa/global_error_bubble_controller.mm b/chrome/browser/ui/cocoa/global_error_bubble_controller.mm
index d50a4b7b9973c705b8c8cc7d7a8677c940e331a6..0b54a6bfa6421dc4c3ebf1736115bee6031f2d21 100644
--- a/chrome/browser/ui/cocoa/global_error_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/global_error_bubble_controller.mm
@@ -22,6 +22,7 @@
#include "chrome/browser/ui/global_error/global_error_service_factory.h"
#include "components/search_engines/util.h"
#import "third_party/google_toolbox_for_mac/src/AppKit/GTMUILocalizerAndLayoutTweaker.h"
+#import "ui/base/cocoa/a11y_util.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/image/image.h"
@@ -79,6 +80,11 @@ class Bridge : public GlobalErrorBubbleViewBase {
gfx::Image image = error_->GetBubbleViewIcon();
DCHECK(!image.IsEmpty());
[iconView_ setImage:image.ToNSImage()];
+ // So far, none of these icons have useful descriptions (they only specify
+ // "image"). Hide them from the accessibility order for voice over. If any
+ // new bubbles use this for an informational icon, we can add a new method
+ // to the GlobalErrorWithStandardBubble class.
+ ui::a11y_util::HideImageFromAccessibilityOrder(iconView_);
[title_ setStringValue:SysUTF16ToNSString(error_->GetBubbleViewTitle())];
std::vector<base::string16> messages = error_->GetBubbleViewMessages();
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698