Commit e74f8e44 authored by Keren Zhu's avatar Keren Zhu Committed by Commit Bot

IPH: Make buttons selectable by screenreader

Reported by A11y test team, the screenreader cannot traverse into the
IPH bubble. This is because the bubble was marked as A11y tree leaf
node. https://bugs.chromium.org/p/chromium/issues/detail?id=1128728#c71

Bug: 1121399, 1128728, 1144334
Change-Id: I6fbfc617bdffae827b53f5c7c9e55cff5bd0e2ad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2511590
Auto-Submit: Keren Zhu <kerenzhu@chromium.org>
Reviewed-by: default avatarCollin Baker <collinbaker@chromium.org>
Commit-Queue: Collin Baker <collinbaker@chromium.org>
Cr-Commit-Position: refs/heads/master@{#822883}
parent cf249d23
......@@ -85,6 +85,7 @@ class MdIPHBubbleButton : public MdTextButton {
// inactive style when the bubble loses focus.
SetTextColor(ButtonState::STATE_DISABLED, kBubbleButtonTextColor);
focus_ring()->SetColor(kBubbleButtonFocusRingColor);
GetViewAccessibility().OverrideIsLeaf(true);
}
void UpdateBackgroundColor() override {
......@@ -148,11 +149,6 @@ FeaturePromoBubbleView::FeaturePromoBubbleView(
? l10n_util::GetStringUTF16(params.body_string_specifier)
: params.body_text_raw;
// Feature promos are purely informational. We can skip reading the UI
// elements inside the bubble and just have the information announced when the
// bubble shows. To do so, we change the a11y tree to make this a leaf node
// and set the name to the message we want to announce.
GetViewAccessibility().OverrideIsLeaf(true);
if (!params.screenreader_string_specifier) {
accessible_name_ = body_text;
} else if (params.feature_accelerator) {
......
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