gecko-dev/accessible/android
James Teh 29e4eb9ab1 Bug 1604101: Fix Android a11y text navigation between nodes. r=MarcoZ
Talkback users expect that when you navigate past the end of the text in a node, Talkback will move into the next node and navigate there.
However, even though text navigation is async (client performs an action on the focused accessible and then waits for a text traversal event), firing a traversal event with a different accessible from the focused accessible is not supported by Talkback.
Firing a11y focus on the new node (as we did previously) doesn't fix this, but instead causes the entire node to be reported, among other weird behaviour.

1. Don't fire a11y focus for text traversal.
    Aside from Talkback reporting the entire node, this was also confusing Talkback, causing it to try to navigate several times into the new node.
2. When navigating text, cache whether we're at either edge.
    We do this because we need to be able to synchronously query whether we're at the edge, but we do navigation async.
    Special handling is needed for words at the end because words don't include trailing space.
3. When performing a text navigation action, check if we're already at the edge using the cache described above.
    If we are, synchronously return false, as Talkback expects.
    Talkback will then move to the next/previous node itself and navigate the text there.

Differential Revision: https://phabricator.services.mozilla.com/D57926

--HG--
extra : moz-landing-system : lando
2019-12-20 12:02:17 +00:00
..
ARIAGridAccessibleWrap.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
AccessibleWrap.cpp Bug 1604101: Fix Android a11y text navigation between nodes. r=MarcoZ 2019-12-20 12:02:17 +00:00
AccessibleWrap.h Bug 1564549 - Implement set selection natively. r=geckoview-reviewers,yzen,snorp 2019-09-23 23:42:40 +00:00
ApplicationAccessibleWrap.h Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
DocAccessibleWrap.cpp Bug 1572831 - Fix usage of nsIDocShellTreeItem in DocAccessibleWrap::DocAccessibleWrap. r=kmag 2019-12-10 15:23:10 +00:00
DocAccessibleWrap.h Bug 1543013 - part 2: Make accessible use mozilla::PresShell directly rather than via nsIPresShell r=Jamie 2019-04-13 12:13:15 +00:00
HTMLTableAccessibleWrap.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
HyperTextAccessibleWrap.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ImageAccessibleWrap.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
Platform.cpp Bug 1604101: Fix Android a11y text navigation between nodes. r=MarcoZ 2019-12-20 12:02:17 +00:00
ProxyAccessibleWrap.cpp Bug 1593104 - Fixes to issues encountered when building on Android with optimization r=Jamie 2019-11-05 13:05:06 +00:00
ProxyAccessibleWrap.h Bug 1564549 - Implement set selection natively. r=geckoview-reviewers,yzen,snorp 2019-09-23 23:42:40 +00:00
RootAccessibleWrap.cpp Bug 1543013 - part 2: Make accessible use mozilla::PresShell directly rather than via nsIPresShell r=Jamie 2019-04-13 12:13:15 +00:00
RootAccessibleWrap.h Bug 1543013 - part 2: Make accessible use mozilla::PresShell directly rather than via nsIPresShell r=Jamie 2019-04-13 12:13:15 +00:00
SessionAccessibility.cpp Bug 1593104 - Fixes to issues encountered when building on Android with optimization r=Jamie 2019-11-05 13:05:06 +00:00
SessionAccessibility.h Bug 1564549 - Implement set selection natively. r=geckoview-reviewers,yzen,snorp 2019-09-23 23:42:40 +00:00
TextLeafAccessibleWrap.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
TraversalRule.cpp Bug 1572595: Make ARIA 1.0 combo boxes reachable with Talkback. r=MarcoZ 2019-11-29 10:11:28 +00:00
TraversalRule.h Bug 1564549 - Introduce native traveral rule. r=yzen 2019-09-23 23:42:51 +00:00
XULListboxAccessibleWrap.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
XULMenuAccessibleWrap.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
XULTreeGridAccessibleWrap.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
moz.build Bug 1564549 - Introduce native traveral rule. r=yzen 2019-09-23 23:42:51 +00:00