Commit 90d35140 authored by Isha Bobra's avatar Isha Bobra Committed by Commit Bot

Android Accessibility: Set flag to enable jump to last element on ACTION_PREVIOUS_HTML_ELEMENT

This CL is a followup on the following CL:
https://chromium-review.googlesource.com/736043

The above CL returns the deepest child of web view on ACTION_PREVIOUS_HTML_ELEMENT if
can_wrap_to_last_element flag in OneShotAccessibilityTreeSearch is set to true.
This CL sets that flag for Android. Assuming a web view is in between native elements, the
following order will be followed for a11y focus:
Native elements -> web view container -> inside web view container -> native elements.
So web view container will always be focused only in the above order.

Bug: 661793
Change-Id: I62dbcb143ed5a152172dc7cde9355f4b7eed79e1
Reviewed-on: https://chromium-review.googlesource.com/884302Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536742}
parent 226e3d9e
......@@ -950,9 +950,7 @@ jint WebContentsAccessibilityAndroid::FindElementType(
: OneShotAccessibilityTreeSearch::BACKWARDS);
tree_search.SetResultLimit(1);
tree_search.SetImmediateDescendantsOnly(false);
// SetCanWrapToLastElement needs to be set as true after talkback pushes its
// corresponding change for b/29103330.
tree_search.SetCanWrapToLastElement(false);
tree_search.SetCanWrapToLastElement(true);
tree_search.SetVisibleOnly(false);
tree_search.AddPredicate(predicate);
......
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