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

Unified Diff: chrome/browser/ui/cocoa/website_settings/website_settings_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 | « chrome/browser/ui/cocoa/global_error_bubble_controller.mm ('k') | ui/base/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm
diff --git a/chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm b/chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm
index 23152e0571b63dcc83e1cd5ea6007143b4fb267c..2672654e09296ae44490e9a605bd51a65eaf79b5 100644
--- a/chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm
@@ -37,6 +37,7 @@
#include "extensions/common/constants.h"
#include "skia/ext/skia_utils_mac.h"
#import "third_party/google_toolbox_for_mac/src/AppKit/GTMUILocalizerAndLayoutTweaker.h"
+#import "ui/base/cocoa/a11y_util.h"
#include "ui/base/cocoa/cocoa_base_utils.h"
#import "ui/base/cocoa/controls/hyperlink_button_cell.h"
#import "ui/base/cocoa/flipped_view.h"
@@ -613,21 +614,12 @@ bool IsInternalURL(const GURL& url) {
NSRect frame = NSMakeRect(point.x, point.y, size.width, size.height);
base::scoped_nsobject<NSImageView> imageView(
[[NSImageView alloc] initWithFrame:frame]);
- [self hideImageFromAccessibilityOrder:imageView];
+ ui::a11y_util::HideImageFromAccessibilityOrder(imageView);
[imageView setImageFrameStyle:NSImageFrameNone];
[view addSubview:imageView.get()];
return imageView.get();
}
-// Hide the given image view from the accessibility order for VoiceOver.
-- (void)hideImageFromAccessibilityOrder:(NSImageView*)imageView {
- // This is the minimum change necessary to get VoiceOver to skip the image
- // (instead of reading the word "image"). Accessibility mechanisms in OSX
- // change once in a while, so this may be fragile.
- [[imageView cell] accessibilitySetOverrideValue:@""
- forAttribute:NSAccessibilityRoleAttribute];
-}
-
// Add a separator as a subview of the given view. Return the new view.
- (NSView*)addSeparatorToView:(NSView*)view {
// Use an arbitrary position; it will be adjusted in performLayout.
« no previous file with comments | « chrome/browser/ui/cocoa/global_error_bubble_controller.mm ('k') | ui/base/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698