Commit 718c6717 authored by Akihiro Ota's avatar Akihiro Ota Committed by Commit Bot

Android: Fix talkback silence when changing slider value

Previously, Talkback would not report the new value of a slider
when adjusted; in order to hear Talkback report the new value, user
had to un-focus and re-focus the slider. Changed the AccessibilityEvent
that is fired when detecting a slider value-change from
TYPE_VIEW_SCROLLED to TYPE_VIEW_SELECTED, which triggers Talkback to
report value of the focused item. This mimics Talkback behavior
of native Android sliders.

Bug: 836554
Change-Id: I4bb3bfafdb4d077f80e1ba4f3c9eecf8a7536497
Reviewed-on: https://chromium-review.googlesource.com/c/1308978Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604021}
parent 2de9adc9
......@@ -946,7 +946,9 @@ public class WebContentsAccessibilityImpl extends AccessibilityNodeProvider
@CalledByNative
private void handleSliderChanged(int id) {
sendAccessibilityEvent(id, AccessibilityEvent.TYPE_VIEW_SCROLLED);
// Sending a TYPE_VIEW_SELECTED event triggers talkback to report new
// slider value
sendAccessibilityEvent(id, AccessibilityEvent.TYPE_VIEW_SELECTED);
}
@CalledByNative
......
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