gecko-dev/accessible/base
James Teh 437c05d961 Bug 1601537: Fix text navigation in text leaf Accessibles on Android. ?MarcoZ r=MarcoZ
For paragraphs, divs, spans, etc., a11y focus on Android goes to text leaf Accessibles, rather than to the HyperTextAccessible container.
This does make sense, as these containers frequently embed other content, so the text needs to be reachable as a separate item.
However, previously, performing text navigation on these text leaf Accessibles returned the HyperTextAccessible parent.
This isn't supported by Talkback, and even if it were, it causes other problems; e.g. a11y focus being lost if the user was focused on a child other than the first child of such a container.
Therefore, if text navigation was performed on a text leaf Accessible, we now return a result within the text leaf Accessible if possible, rather than the HyperTextAccessible.

1. Make AccessibleWrap::GetTextContents support text leaf Accessibles (for both local and remote proxied Accessibles).
    This is used when providing text for text traversal events.

2. When navigating text on Android, we use Pivot::Next/PrevText.
    However, this will always return a HyperTextAccessible, even when starting on a text leaf.
    Therefore, if the result from Pivot::Next/prevText resides entirely within the same text leaf, translate the offsets from the HyperTextAccessible so they're relative to the text leaf and return the text leaf.

3. Pivot::Next/PrevText already supported starting from a text leaf Accessible.
    However, they ignored the offsets, which meant that navigating from a text leaf would always navigate to the start/end of the text leaf.
    Now, if a text leaf is passed to Pivot::Next/PrevText, the offsets (if specified) are translated to the HyperTextAccessible parent first.

4. Adjust the existing character/word/line tests so they ensure that navigation returns the node that has a11y focus; i.e. the text leaf.

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

--HG--
extra : moz-landing-system : lando
2019-12-16 06:25:54 +00:00
..
ARIAMap.cpp Bug 1540813 - Support new ARIA roles insertion and deletion, r=Jamie 2019-08-21 20:36:39 +00:00
ARIAMap.h Bug 1600362 - Cleanup IntersectionObserver. r=smaug 2019-11-29 20:39:36 +00:00
ARIAStateMap.cpp
ARIAStateMap.h
AccEvent.cpp Bug 1578355 - Part 1: Move user-activation code from EventStateManager to UserActivation; r=smaug 2019-09-20 20:51:25 +00:00
AccEvent.h Bug 1558390: For OOP iframes, also send the embedder accessible when the BrowserBridgeChild is created. r=yzen,nika 2019-06-13 02:19:42 +00:00
AccGroupInfo.cpp Bug 1515186 - Always calculate group position for all children of an accessible after a tree mutation, r=Jamie 2019-01-10 05:59:01 +00:00
AccGroupInfo.h
AccIterator.cpp Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-10-21 14:13:44 +00:00
AccIterator.h Bug 1587791 - remove XBL backed accessible relations support r=MarcoZ 2019-10-10 14:08:17 +00:00
AccTypes.h
AccessibleOrProxy.cpp
AccessibleOrProxy.h
Asserts.cpp
DocManager.cpp Bug 1600545 - Remove useless inclusions of header files generated from IDL files in accessible/, browser/, caps/, chrome/, devtools/, docshell/, editor/, extensions/, gfx/, hal/, image/, intl/, ipc/, js/, layout/, and media/ r=Ehsan 2019-12-06 09:16:44 +00:00
DocManager.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
EmbeddedObjCollector.cpp
EmbeddedObjCollector.h
EventQueue.cpp Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre 2019-01-18 10:16:18 +01:00
EventQueue.h
EventTree.cpp Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre 2019-01-18 10:16:18 +01:00
EventTree.h
Filters.cpp
Filters.h
FocusManager.cpp Bug 1594337: When dismissing a pop-up or the menu bar, if focus is inside an OOP iframe, restore a11y focus inside the iframe. r=yzen 2019-11-13 16:01:02 +00:00
FocusManager.h Bug 1190882: If the focused accessible is removed from the tree, fire a11y focus on the document. r=eeejay 2019-05-15 00:31:16 +00:00
IDSet.h
Logging.cpp Bug 1600545 - Remove useless inclusions of header files generated from IDL files in accessible/, browser/, caps/, chrome/, devtools/, docshell/, editor/, extensions/, gfx/, hal/, image/, intl/, ipc/, js/, layout/, and media/ r=Ehsan 2019-12-06 09:16:44 +00:00
Logging.h Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
MarkupMap.h Bug 982125 - make HTML5 <mark> accessible, r=Jamie 2019-11-18 05:34:15 +00:00
NotificationController.cpp Bug 1565728 - Introduce PDocAccessiblePlatformExt. r=Jamie 2019-09-13 16:55:01 +00:00
NotificationController.h Bug 686400 - Filter content insertions in DocAccessible. r=Jamie 2019-08-01 16:19:15 +00:00
Pivot.cpp Bug 1601537: Fix text navigation in text leaf Accessibles on Android. ?MarcoZ r=MarcoZ 2019-12-16 06:25:54 +00:00
Pivot.h Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-10-06 18:29:55 +00:00
Platform.h Bug 1543013 - part 1: Mark some methods of nsCoreUtils as MOZ_CAN_RUN_SCRIPT r=Jamie 2019-04-13 12:13:13 +00:00
Relation.h
RelationType.h
RelationTypeMap.h
Role.h Bug 982125 - make HTML5 <mark> accessible, r=Jamie 2019-11-18 05:34:15 +00:00
RoleMap.h Bug 982125 - make HTML5 <mark> accessible, r=Jamie 2019-11-18 05:34:15 +00:00
SelectionManager.cpp Bug 1600545 - Remove useless inclusions of header files generated from IDL files in accessible/, browser/, caps/, chrome/, devtools/, docshell/, editor/, extensions/, gfx/, hal/, image/, intl/, ipc/, js/, layout/, and media/ r=Ehsan 2019-12-06 09:16:44 +00:00
SelectionManager.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
States.h
Statistics.h
StyleInfo.cpp Bug 1576194 - Remove kDisplayKTable. r=mats 2019-08-23 15:52:05 +00:00
StyleInfo.h
TextAttrs.cpp Bug 1602317 - Switch style system to associated constants-in-body. r=heycam 2019-12-09 03:32:28 +00:00
TextAttrs.h Bug 1602317 - Switch style system to associated constants-in-body. r=heycam 2019-12-09 03:32:28 +00:00
TextRange-inl.h
TextRange.cpp
TextRange.h
TextUpdater.cpp
TextUpdater.h
TreeWalker.cpp Bug 1587512 - remove XBL dialog support bits; remove XBL support from TreeWalker; update XBL related comments and remove XBL mutation test r=MarcoZ,Jamie 2019-10-14 05:36:10 +00:00
TreeWalker.h
XULMap.h Bug 1513325 - Remove textbox binding. r=emilio,dao 2019-10-09 09:27:28 +00:00
moz.build Bug 1587791 - remove XBL backed accessible relations support r=MarcoZ 2019-10-10 14:08:17 +00:00
nsAccCache.h Bug 1600545 - Remove useless inclusions of header files generated from IDL files in accessible/, browser/, caps/, chrome/, devtools/, docshell/, editor/, extensions/, gfx/, hal/, image/, intl/, ipc/, js/, layout/, and media/ r=Ehsan 2019-12-06 09:16:44 +00:00
nsAccUtils.cpp Bug 1600362 - Cleanup IntersectionObserver. r=smaug 2019-11-29 20:39:36 +00:00
nsAccUtils.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
nsAccessibilityService.cpp Bug 1600545 - Remove useless inclusions of header files generated from IDL files in accessible/, browser/, caps/, chrome/, devtools/, docshell/, editor/, extensions/, gfx/, hal/, image/, intl/, ipc/, js/, layout/, and media/ r=Ehsan 2019-12-06 09:16:44 +00:00
nsAccessibilityService.h Bug 1600362 - Cleanup IntersectionObserver. r=smaug 2019-11-29 20:39:36 +00:00
nsAccessiblePivot.cpp Bug 1580019 - Refactor nsIAccessiblePivot to a stateless Pivot class. r=Jamie 2019-09-18 22:23:58 +00:00
nsAccessiblePivot.h Bug 1580019 - Refactor nsIAccessiblePivot to a stateless Pivot class. r=Jamie 2019-09-18 22:23:58 +00:00
nsCoreUtils.cpp Bug 1569262 - Rename nsIDocShellTreeItem::GetRootTreeItem to GetInProcessRootTreeItem for Fission marking. r=nika 2019-08-07 19:24:00 +00:00
nsCoreUtils.h Bug 686400 - Add function to nsCoreUtils for display: contents. r=Jamie 2019-08-01 16:19:06 +00:00
nsEventShell.cpp
nsEventShell.h
nsTextEquivUtils.cpp Bug 1546697 - Use a consistent style for enum classes in layout. r=dholbert 2019-04-25 23:03:04 +00:00
nsTextEquivUtils.h Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00