New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 661793 link

Starred by 3 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug
Team-Accessibility



Sign in to add a comment

Android accessibility: enable jumping to first/last elements in the page

Project Member Reported by dmazzoni@google.com, Nov 2 2016

Issue description

If nothing in the WebView has accessibility focus, ACTION_NEXT_HTML_ELEMENT should return the first matching element, and ACTION_PREVIOUS_HTML_ELEMENT should return the last matching element.

Currently there's no easy way to get the last element.

See b/29103330

 
Labels: NewComponent-Accessibility-Compatibility
Labels: NewComponent-Accessibility
Components: UI>Accessibility>Compatibility
Components: -UI>Accessibility
Labels: -newcomponent-accessibility-compatibility -newcomponent-accessibility
Labels: triage-dominic-android
Labels: -Pri-2 -triage-dominic-android Pri-1
Status: Assigned (was: Started)
Project Member

Comment 7 by bugdroid1@chromium.org, Nov 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/89e4745fec7543e2e53d2fe1e019a286b4f42da1

commit 89e4745fec7543e2e53d2fe1e019a286b4f42da1
Author: Isha Bobra <ibobra@google.com>
Date: Mon Nov 06 21:58:48 2017

Android Accessibility: enable jump to last element on ACTION_PREVIOUS_HTML_ELEMENT

This 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 change is 
added 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.

PS: Currently can_wrap_to_last_element is set to false, but needs to be true after Talkback ships
the corresponding change - CL 174482079

Bug: 661793
Change-Id: I4006c9dec23d3ca9c11f2e75b6c5a988e36fd330
Reviewed-on: https://chromium-review.googlesource.com/736043
Commit-Queue: Isha Bobra <ibobra@google.com>
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#514252}
[modify] https://crrev.com/89e4745fec7543e2e53d2fe1e019a286b4f42da1/content/browser/accessibility/browser_accessibility_android.cc
[modify] https://crrev.com/89e4745fec7543e2e53d2fe1e019a286b4f42da1/content/browser/accessibility/browser_accessibility_manager.cc
[modify] https://crrev.com/89e4745fec7543e2e53d2fe1e019a286b4f42da1/content/browser/accessibility/browser_accessibility_manager.h
[modify] https://crrev.com/89e4745fec7543e2e53d2fe1e019a286b4f42da1/content/browser/accessibility/browser_accessibility_manager_unittest.cc
[modify] https://crrev.com/89e4745fec7543e2e53d2fe1e019a286b4f42da1/content/browser/accessibility/one_shot_accessibility_tree_search.cc
[modify] https://crrev.com/89e4745fec7543e2e53d2fe1e019a286b4f42da1/content/browser/accessibility/one_shot_accessibility_tree_search.h
[modify] https://crrev.com/89e4745fec7543e2e53d2fe1e019a286b4f42da1/content/browser/accessibility/one_shot_accessibility_tree_search_unittest.cc
[modify] https://crrev.com/89e4745fec7543e2e53d2fe1e019a286b4f42da1/content/browser/accessibility/web_contents_accessibility_android.cc

Owner: ibobra@chromium.org
Can this be marked fixed?

We still need to mark the flag as true. Talkback will push that change soon, so then we can turn the flag "on" from chrome side too. Lets wait for that before we mark it as fixed?
Project Member

Comment 11 by bugdroid1@chromium.org, Feb 14 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/90d351407da304eb29e4b94ab937a527fe7f2347

commit 90d351407da304eb29e4b94ab937a527fe7f2347
Author: Isha Bobra <ibobra@google.com>
Date: Wed Feb 14 17:17:51 2018

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/884302
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536742}
[modify] https://crrev.com/90d351407da304eb29e4b94ab937a527fe7f2347/content/browser/accessibility/web_contents_accessibility_android.cc

Comment 12 by ibobra@google.com, Feb 14 2018

Status: Fixed (was: Assigned)
Project Member

Comment 13 by bugdroid1@chromium.org, Apr 19 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c89b77ae1e33f331ee6766e89c5c41530675aa36

commit c89b77ae1e33f331ee6766e89c5c41530675aa36
Author: Dominic Mazzoni <dmazzoni@chromium.org>
Date: Thu Apr 19 21:41:44 2018

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

This reverts commit 90d351407da304eb29e4b94ab937a527fe7f2347.

Reason for revert: infinite loop ( crbug.com/834866 )

Original change's description:
> 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/884302
> Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
> Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#536742}

TBR=dmazzoni@chromium.org,ibobra@google.com
NOTRY=true

Bug: 661793,  834866 
Change-Id: I3dc34c17908aa06c33a904415d10fc0d5a56fc2c
Reviewed-on: https://chromium-review.googlesource.com/1019960
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#552169}
[modify] https://crrev.com/c89b77ae1e33f331ee6766e89c5c41530675aa36/content/browser/accessibility/web_contents_accessibility_android.cc

Project Member

Comment 14 by bugdroid1@chromium.org, Apr 20 2018

Labels: merge-merged-3359
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/47eaf929d3aec09fe679243c31b782b462e7c7bc

commit 47eaf929d3aec09fe679243c31b782b462e7c7bc
Author: Dominic Mazzoni <dmazzoni@chromium.org>
Date: Fri Apr 20 16:31:57 2018

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

This reverts commit 90d351407da304eb29e4b94ab937a527fe7f2347.

Reason for revert: infinite loop ( crbug.com/834866 )

Original change's description:
> 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/884302
> Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
> Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#536742}

TBR=dmazzoni@chromium.org,ibobra@google.com
NOTRY=true

Bug: 661793,  834866 
Change-Id: I3dc34c17908aa06c33a904415d10fc0d5a56fc2c
Reviewed-on: https://chromium-review.googlesource.com/1019960
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#552169}(cherry picked from commit c89b77ae1e33f331ee6766e89c5c41530675aa36)
Reviewed-on: https://chromium-review.googlesource.com/1022014
Cr-Commit-Position: refs/branch-heads/3359@{#744}
Cr-Branched-From: 66afc5e5d10127546cc4b98b9117aff588b5e66b-refs/heads/master@{#540276}
[modify] https://crrev.com/47eaf929d3aec09fe679243c31b782b462e7c7bc/content/browser/accessibility/web_contents_accessibility_android.cc

Project Member

Comment 15 by bugdroid1@chromium.org, Apr 20 2018

Labels: merge-merged-3396
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/721f3d856e8e0a80e266264d2746bb08dbf21174

commit 721f3d856e8e0a80e266264d2746bb08dbf21174
Author: Dominic Mazzoni <dmazzoni@chromium.org>
Date: Fri Apr 20 16:32:03 2018

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

This reverts commit 90d351407da304eb29e4b94ab937a527fe7f2347.

Reason for revert: infinite loop ( crbug.com/834866 )

Original change's description:
> 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/884302
> Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
> Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#536742}

TBR=dmazzoni@chromium.org,ibobra@google.com
NOTRY=true

Bug: 661793,  834866 
Change-Id: I3dc34c17908aa06c33a904415d10fc0d5a56fc2c
Reviewed-on: https://chromium-review.googlesource.com/1019960
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#552169}(cherry picked from commit c89b77ae1e33f331ee6766e89c5c41530675aa36)
Reviewed-on: https://chromium-review.googlesource.com/1022015
Cr-Commit-Position: refs/branch-heads/3396@{#163}
Cr-Branched-From: 9ef2aa869bc7bc0c089e255d698cca6e47d6b038-refs/heads/master@{#550428}
[modify] https://crrev.com/721f3d856e8e0a80e266264d2746bb08dbf21174/content/browser/accessibility/web_contents_accessibility_android.cc

Project Member

Comment 16 by bugdroid1@chromium.org, Jun 13 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a953ec895d88d23a76772b9ff5cce1a4a84348c8

commit a953ec895d88d23a76772b9ff5cce1a4a84348c8
Author: Dominic Mazzoni <dmazzoni@chromium.org>
Date: Wed Jun 13 16:46:35 2018

Android accessibility: skip the root element when it has no title

This change was originally landed in r432621 - the idea is that when a page
has no title, there's no reason we should allow the user to swipe to the
root element.

For some reason in r514252 this was inverted as part of making it possible
to jump to the last element on a page, but the new logic doesn't make
sense. Restore it to the previous behavior.

Bug: 661793,  660090 ,  801292 
Change-Id: Iba81d0429a04845f093c5f07449c26fa8514bda4
Reviewed-on: https://chromium-review.googlesource.com/1097953
Reviewed-by: Alice Boxhall <aboxhall@chromium.org>
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566868}
[modify] https://crrev.com/a953ec895d88d23a76772b9ff5cce1a4a84348c8/content/browser/accessibility/browser_accessibility_android.cc
[modify] https://crrev.com/a953ec895d88d23a76772b9ff5cce1a4a84348c8/content/test/data/accessibility/html/isInteresting-expected-android.txt

Project Member

Comment 17 by bugdroid1@chromium.org, Jul 11

Labels: merge-merged-3440
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b099b45441859b14ed3b7ca81402af5c28fe2a92

commit b099b45441859b14ed3b7ca81402af5c28fe2a92
Author: Dominic Mazzoni <dmazzoni@chromium.org>
Date: Wed Jul 11 22:17:32 2018

Merge to M68: Android accessibility: skip the root element when it has no title

This change was originally landed in r432621 - the idea is that when a page
has no title, there's no reason we should allow the user to swipe to the
root element.

For some reason in r514252 this was inverted as part of making it possible
to jump to the last element on a page, but the new logic doesn't make
sense. Restore it to the previous behavior.

Bug: 661793,  660090 ,  801292 
Change-Id: Iba81d0429a04845f093c5f07449c26fa8514bda4
Reviewed-on: https://chromium-review.googlesource.com/1097953
Reviewed-by: Alice Boxhall <aboxhall@chromium.org>
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#566868}(cherry picked from commit a953ec895d88d23a76772b9ff5cce1a4a84348c8)
Reviewed-on: https://chromium-review.googlesource.com/1134101
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/branch-heads/3440@{#649}
Cr-Branched-From: 010ddcfda246975d194964ccf20038ebbdec6084-refs/heads/master@{#561733}
[modify] https://crrev.com/b099b45441859b14ed3b7ca81402af5c28fe2a92/content/browser/accessibility/browser_accessibility_android.cc
[modify] https://crrev.com/b099b45441859b14ed3b7ca81402af5c28fe2a92/content/test/data/accessibility/html/isInteresting-expected-android.txt

Owner: ----
Status: Available (was: Fixed)
Cc: ibobra@google.com
 Issue 851176  has been merged into this issue.
Since the original commit for this bug was reverted, the underlying issue still exists and needs to be slated for a fix.
As a reminder, the issue is that it is difficult to linearly traverse in and out of embedded web views with TalkBack screen reader. The user experience in apps where web views are heavily used, such as Gmail and other 3rd-party ones, is affected.

Sign in to add a comment