Commit e93c564e authored by Devlin Cronin's avatar Devlin Cronin Committed by Commit Bot

[Extensions Mac A11y] Don't VoiceOver the icon in the install dialog

The icon in the install dialog is just the icon of the extension, whose
name is included in the title. Currently, this icon simply says "image"
when VoiceOver is used to highlight the element.

We could add an alt-text of "<Extension name> icon", but this doesn't
add any additional context beyond what the title (immediately before
the image) provides. Instead, remove the icon from the VoiceOver tree
entirely.

Bug: 747624
Change-Id: Ic5373ca4a766b72696839062ffa89d8780d97e35
Reviewed-on: https://chromium-review.googlesource.com/701918Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506617}
parent d629cc6e
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "extensions/common/extension_urls.h" #include "extensions/common/extension_urls.h"
#include "skia/ext/skia_utils_mac.h" #include "skia/ext/skia_utils_mac.h"
#import "third_party/google_toolbox_for_mac/src/AppKit/GTMUILocalizerAndLayoutTweaker.h" #import "third_party/google_toolbox_for_mac/src/AppKit/GTMUILocalizerAndLayoutTweaker.h"
#import "ui/base/cocoa/a11y_util.h"
#import "ui/base/cocoa/controls/hyperlink_button_cell.h" #import "ui/base/cocoa/controls/hyperlink_button_cell.h"
#include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util.h"
#include "ui/base/l10n/l10n_util_mac.h" #include "ui/base/l10n/l10n_util_mac.h"
...@@ -310,6 +311,9 @@ bool HasAttribute(id item, CellAttributesMask attributeMask) { ...@@ -310,6 +311,9 @@ bool HasAttribute(id item, CellAttributesMask attributeMask) {
} }
[iconView_ setImage:prompt_->icon().ToNSImage()]; [iconView_ setImage:prompt_->icon().ToNSImage()];
// The icon does not add any additional information for VoiceOver beyond what
// the title already gives. Ignore the icon in VoiceOver.
ui::a11y_util::HideImageFromAccessibilityOrder(iconView_);
// The dialog is laid out in the NIB exactly how we want it assuming that // The dialog is laid out in the NIB exactly how we want it assuming that
// each label fits on one line. However, for each label, we want to allow // each label fits on one line. However, for each label, we want to allow
......
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