Commit e9600b8f authored by wutao's avatar wutao Committed by Commit Bot

tabbed_pane: notify a11y event on focus

In MdTab::OnFocus, it does not notify a11y event of focus, which causes
the ChromeVox focus out of sync. This patch notifies the event as we do
in the Tab::OnFocus.

Bug: 876388
Test: manual
Change-Id: I332c3dfa355d9ab41cf5848f549cde164d73b045
Reviewed-on: https://chromium-review.googlesource.com/c/1406196Reviewed-by: default avatarMichael Wasserman <msw@chromium.org>
Commit-Queue: Tao Wu <wutao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#622062}
parent 5a98d611
......@@ -383,6 +383,13 @@ void MdTab::OnFocus() {
ui::NativeTheme::kColorId_FocusedBorderColor),
0x66)));
}
// When the tab gains focus, send an accessibility event indicating that the
// contents are focused. When the tab loses focus, whichever new View ends up
// with focus will send an ax::mojom::Event::kFocus of its own, so there's no
// need to send one in OnBlur().
if (contents())
contents()->NotifyAccessibilityEvent(ax::mojom::Event::kFocus, true);
SchedulePaint();
}
......
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