Commit 9a3c9c3a authored by Leonard Grey's avatar Leonard Grey Committed by Commit Bot

Announce search keyword as a live region change

This is the "better than nothing" version; like KeywordHintView (press tab to search Google),
it announces when the keyword is set. That means this sequence doesn't work as expected:

1) Type goo
2) Press tab to enter keyword mode
3) "Search Google announced" (so far so good)
4) backspace to leave keyword mode
5) Tab again to re-enter keyword mode
6) No announcement, since the keyword is the same.

We might need to rearrange things to fix that part, but for now this is an improvement.

Bug: 785375
Change-Id: Ia887f26d19af1a06f16beff5db1aba81eda96dfd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1894304Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Leonard Grey <lgrey@chromium.org>
Cr-Commit-Position: refs/heads/master@{#711778}
parent ba93ea0f
......@@ -86,6 +86,7 @@ void SelectedKeywordView::SetKeyword(const base::string16& keyword) {
// class is calculating the preferred size. It will be updated again in
// Layout(), taking into account how much space has actually been allotted.
SetLabelForCurrentWidth();
NotifyAccessibilityEvent(ax::mojom::Event::kLiveRegionChanged, true);
}
int SelectedKeywordView::GetExtraInternalSpacing() const {
......
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