| 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 8c2e8a66239b08de8a38f93ab04a18a384941324..46823011f58260178690ae136f26c31d9f72d415 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
|
| @@ -619,18 +619,30 @@ bool IsInternalURL(const GURL& url) {
|
| }
|
|
|
| // Add an image as a subview of the given view, placed at a pre-determined x
|
| -// position and the given y position. Return the new NSImageView.
|
| +// position and the given y position. The image is not in the accessibility
|
| +// order, since the image is always accompanied by text in this bubble. Return
|
| +// the new NSImageView.
|
| - (NSImageView*)addImageWithSize:(NSSize)size
|
| toView:(NSView*)view
|
| atPoint:(NSPoint)point {
|
| NSRect frame = NSMakeRect(point.x, point.y, size.width, size.height);
|
| base::scoped_nsobject<NSImageView> imageView(
|
| [[NSImageView alloc] initWithFrame:frame]);
|
| + [self 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.
|
|
|