AXPosition should set an upstream affinity when computing a parent equivalent position that happens to be at the end of the line |
||
Issue descriptionThis issue is accessibility related and is affecting email composition in Gmail, hence Pri1. Steps: Open Gmail and compose a new email. Type the word "Hello", press enter and type the word "there". Move up and press End to put the caret at the end of the first line. Observe that if you use the Read Line command, e.g. Insert+Up for Jaws or NVDA, the second line is read instead of the first. Technical details: <div contenteditable>hello<div>there</div></div> The above snippet produces text that spans two lines. If we set a text position on the static text object containing the word "hello" at offset 5, i.e. after the last letter, the affinity is correctly set to downstream, since there is no confusion as to the fact that the text position is at the end of the first line. Upstream affinity is only used when the position is ambiguous, not every time the position is at the end of a line. If we compute a parent equivalent position , we might need to set the affinity to upstream because ambiguity would be introduced. For example, a text position on the outer div at position 5 might indicate the beginning of the inner div, hence the start of the second line, or the end of the word "hello" and hence the end of the first line. Resolution: Either always set an upstream affinity when at the end of a line or always recompute affinity when computing parent equivalent positions. I am leaning towards the latter approach.
,
May 23 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f3ae656ad80fbec934c4d1e6648c0cd4ff030127 commit f3ae656ad80fbec934c4d1e6648c0cd4ff030127 Author: Nektarios Paisios <nektar@chromium.org> Date: Wed May 23 23:29:25 2018 Expose anonymous editable blocks to a11y Anonymous blocks were not correctly marked as editable and richly editable in Blink and thus unnecessarily ignored affecting selection on Windows. R=dmazzoni@chromium.org Bug: 831179 Change-Id: Ic53ad29e63d7e9bbfd775ce5f933f20e7ea656f5 Tested: Layout test Reviewed-on: https://chromium-review.googlesource.com/1004925 Commit-Queue: Nektarios Paisios <nektar@chromium.org> Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org> Reviewed-by: Nektarios Paisios <nektar@chromium.org> Cr-Commit-Position: refs/heads/master@{#561308} [add] https://crrev.com/f3ae656ad80fbec934c4d1e6648c0cd4ff030127/third_party/WebKit/LayoutTests/accessibility/editable-anonymous-block.html [modify] https://crrev.com/f3ae656ad80fbec934c4d1e6648c0cd4ff030127/third_party/WebKit/LayoutTests/accessibility/inline-continuations-expected.txt [modify] https://crrev.com/f3ae656ad80fbec934c4d1e6648c0cd4ff030127/third_party/WebKit/LayoutTests/accessibility/inline-continuations.html [modify] https://crrev.com/f3ae656ad80fbec934c4d1e6648c0cd4ff030127/third_party/blink/renderer/modules/accessibility/ax_layout_object.cc [modify] https://crrev.com/f3ae656ad80fbec934c4d1e6648c0cd4ff030127/third_party/blink/renderer/modules/accessibility/ax_layout_object.h
,
May 24 2018
|
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, Apr 25 2018