Commit 25035574 authored by Aaron Leventhal's avatar Aaron Leventhal Committed by Commit Bot

Update screen reader with new Omnibox text

AX-Relnotes: Omnibox accessibility reliability
Bug: 943105, 1039422
Change-Id: Icf6adebabdcd7d9627c58f3c7260fc5359043fab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2226061
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Commit-Queue: Tommy Li <tommycli@chromium.org>
Auto-Submit: Aaron Leventhal <aleventhal@chromium.org>
Reviewed-by: default avatarTommy Li <tommycli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#774400}
parent 305d5df2
......@@ -826,11 +826,17 @@ void OmniboxViewViews::OnRevertTemporaryText(const base::string16& display_text,
// TextChanged(), since OmniboxPopupModel::ResetToDefaultMatch() has already
// been called by now, and it would've called TextChanged() if it was
// warranted.
// However, it's important to notify accessibility that the value has changed,
// otherwise the screen reader will use the old accessibility label text.
NotifyAccessibilityEvent(ax::mojom::Event::kValueChanged, true);
}
void OmniboxViewViews::ClearAccessibilityLabel() {
if (friendly_suggestion_text_.empty())
return;
friendly_suggestion_text_.clear();
friendly_suggestion_text_prefix_length_ = 0;
NotifyAccessibilityEvent(ax::mojom::Event::kValueChanged, true);
}
void OmniboxViewViews::SetAccessibilityLabel(const base::string16& display_text,
......
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