In text editing, it's possible for the cursor offset to be ambiguous, i.e. the cursor position is right between two characters, one on the previous line and one on the next line.
There are actually two different visible positions on screen that correspond to the same character offset.
In Blink this concept is represented by TextAffinity. An affinity of upstream means the cursor is on the previous line, and downstream means it's on the next line. The affinity has no effect when the cursor position is not ambiguous like that.
To reproduce this bug, load the following url:
data:text/html,<textarea autofocus style="width:3em;">1-2-3-4-5-6-</textarea>
As an explanation, this text box is very narrow so it won't all fit on one line, but Blink will wrap at hyphens by default. This is an easy way to create a situation where there's an ambiguous cursor position.
To repro the bug, focus the text box and then press the right arrow until the cursor is at the end. You must press the right arrow, don't use down arrow or End or you might not get the same result!
Once you're at the end, press the up arrow. It should now be at the end of the previous line, however VoiceOver and probably other screen readers are announcing the last line, because the cursor index into the text is ambiguous.
Comment 1 by bugdroid1@chromium.org
, Aug 1 2016