Commit 1653aecb authored by Dominic Mazzoni's avatar Dominic Mazzoni Committed by Commit Bot

Have Chrome handle ARIA live regions instead of TalkBack

If set call AccessibilityNodeInfo.setLiveRegion on an ARIA Live
Region, TalkBack will announce changes to that portion of the screen.
Unfortunately it always speaks the entire contents, which is often
not the correct behavior.

Instead, just use Chrome's own live region handling, which tells
TalkBack what text to speak, and correctly only announces new text
added to a live region.

Long-term, more changes are needed to complete Chrome's live region
handling, but this is an improvement for some important real-world
live regions.

would speak the entire region rather than only what was added

Bug: 1042893, 1128193
AX-Relnotes: fixes issue where ARIA live regions on Android
Change-Id: Icd8a0ec8247681862313f1620bbd5aa6567e4e6e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2425747Reviewed-by: default avatarMark Schillaci <mschillaci@google.com>
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#809835}
parent 8f02a380
......@@ -1710,7 +1710,11 @@ public class WebContentsAccessibilityImpl extends AccessibilityNodeProvider
node.setDismissable(dismissable);
node.setMultiLine(multiLine);
node.setInputType(inputType);
node.setLiveRegion(liveRegion);
// Deliberately don't call setLiveRegion because TalkBack speaks
// the entire region anytime it changes. Instead Chrome will
// call announceLiveRegionText() only on the nodes that change.
// node.setLiveRegion(liveRegion);
// We only apply the |errorMessage| if {@link setAccessibilityNodeInfoBooleanAttributes}
// set |contentInvalid| to true based on throttle delay.
......
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