Issue metadata
Sign in to add a comment
|
Incorrect accessible line offsets for line feed after wrapped line |
||||||||||||||||||||||
Issue descriptionChrome Version: 61.0.3122.0 (Official Build) canary(64-bit) OS: Windows 10 Version 1703 (OS Build 16199.1000) 64-bit What steps will reproduce the problem? (1) Start Chrome and the NVDA screen reader. (2) Open this URL: data:text/html,<textarea cols="3"></textarea> (3) Type "ab cd", then press enter. (4) Press left arrow to position the caret on the line feed at the end of the previous line. (5) Press NVDA+upArrow (laptop layout: NVDA+l) to read the current line. What is the expected result? NVDA should say "cd" What happens instead? NVDA says "a" The accessible text line offsets reported for the line feed (offset 5) are (0, 0). They should be (3, 6) (i.e. "cd\n"). Impact: This results in inaccurate reporting when at the end of wrapped lines and is very confusing/misleading for Chrome + NVDA users.
,
Sep 1 2017
The cause of this bug is the fact that the code in |AXPosition| that computes line boundaries doesn't take into account the affinity (upstream vs. downstream) of the position. AXPosition::AsLeafTextPosition should be modified and take affinity into account when returning an inline text object, such that it will return the last offset in the first line's inline text object when the affinity is upstream, vs. the first offset on the second line's inline text object when the affinity is downstream.
,
Sep 7 2017
Setting to Available since Nektarios has already identified the issue.
,
Nov 10 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a020ea5b0fe8649bd5245c25b4702ef8a6c7e883 commit a020ea5b0fe8649bd5245c25b4702ef8a6c7e883 Author: Nektarios Paisios <nektar@chromium.org> Date: Fri Nov 10 23:52:08 2017 Changes AXPosition to include affinity when computing leaf text positions and simplified line boundary calculations 1. When converting text positions, such as those in a text field, to either a tree position or a leaf text position, we should take affinity into consideration. When there are two equivalent resulting positions, one at the start of a child node and one after the previous child node, we should return the former when affinity is downstream and the latter when affinity is upstream. 2. Line breaks are not always used to separate lines in content editables. Modifies logic that detects if we are at the end of a line to ensure that if there is some white space at the end of the line, then we would detect it as a line separator in addition to a line break. 3. Simplifies logic for finding next and previous line boundaries by relying on AtStartOfline and AtEndOfLine methods, thus creating a smaller piece of code that deals with boundary detection. R=dmazzoni@chromium.org Bug: 731056 Tested: existing unit tests, manually with Gmail textareas and content editables Change-Id: Ic936122ef19f66fcb4a1cc88cd001f4376e34346 Reviewed-on: https://chromium-review.googlesource.com/745724 Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org> Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org> Cr-Commit-Position: refs/heads/master@{#515748} [modify] https://crrev.com/a020ea5b0fe8649bd5245c25b4702ef8a6c7e883/content/browser/accessibility/browser_accessibility_position.cc [modify] https://crrev.com/a020ea5b0fe8649bd5245c25b4702ef8a6c7e883/content/browser/accessibility/browser_accessibility_position.h [modify] https://crrev.com/a020ea5b0fe8649bd5245c25b4702ef8a6c7e883/content/browser/accessibility/browser_accessibility_win_unittest.cc [modify] https://crrev.com/a020ea5b0fe8649bd5245c25b4702ef8a6c7e883/ui/accessibility/ax_node_position.cc [modify] https://crrev.com/a020ea5b0fe8649bd5245c25b4702ef8a6c7e883/ui/accessibility/ax_node_position.h [modify] https://crrev.com/a020ea5b0fe8649bd5245c25b4702ef8a6c7e883/ui/accessibility/ax_node_position_unittest.cc [modify] https://crrev.com/a020ea5b0fe8649bd5245c25b4702ef8a6c7e883/ui/accessibility/ax_position.h
,
Nov 14 2017
,
Nov 14 2017
,
Nov 16 2017
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by dmazz...@chromium.org
, Aug 4 2017