Fix Narrator's Scan Mode navigation
When using Narrator on Windows with Scan Mode turned on and navigating with the down arrow, it blocks for a specific accessibility tree. e.g., ++++genericContainer ++++++image ++++textField editable focusable ++++++genericContainer editable ++++++++staticText editable This was caused by a degenerate range where both endpoints were on two different anchors. Apparently, the attribute value returned by AXPlatformNodeTextRangeProvider::GetAttributeValue were incorrect when on a degenerate range, causing Windows ATs to behave undesirably. This issue is fixed by refactoring AXPlatformNodeTextRangeProvider::NormalizeTextRange so that it applies to degenerate ranges too. Now, if both endpoints of a range are equals but on two different anchors, the normalization will move both endpoints to the start of the next anchor. I added a unit test and a descriptive comment about NormalizeTextRange(). Also, I moved the order of NormalizeTextRange() and NormalizeAsUnignoredTextRange(). Bug: 928948 Change-Id: Icd4a3a3d6f569a35b7699d569aaef95449443774 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2033632 Commit-Queue: Benjamin Beaudry <benjamin.beaudry@microsoft.com> Reviewed-by:Kurt Catti-Schmidt <kschmi@microsoft.com> Reviewed-by:
Ethan Jimenez <ethavar@microsoft.com> Reviewed-by:
Kevin Babbitt <kbabbitt@microsoft.com> Cr-Commit-Position: refs/heads/master@{#739278}
Showing
Please register or sign in to comment