Closed Bug 1713050 Opened 3 years ago Closed 2 years ago

Reading text in a textarea with up and down arrows only reads the word the cursor is on, not the whole line.

Categories

(Core :: Disability Access APIs, defect)

Desktop
macOS
defect

Tracking

()

RESOLVED FIXED
100 Branch
Tracking Status
firefox-esr91 --- wontfix
firefox98 --- wontfix
firefox99 --- wontfix
firefox100 --- fixed

People

(Reporter: MarcoZ, Assigned: eeejay)

Details

(Keywords: regression)

Attachments

(3 files)

STR:

  1. Open data:text/html,<textarea cols="80"></textarea>.
  2. Type some text, at least two lines, forcing it to wrap.
  3. Press CMD+Pos1 to go to the top. * Expected: VoiceOver should read the whole line.
    • Actual: VoiceOver only reads the word the cursor lands on.
  4. Press VoiceOver+L to read the whole line.
    • Result: The whole line is read, correctly until the point where the browser wrapped the typed text.
  5. Press DownArrow.
    • Expected: VoiceOver should read the whole next line.
    • Actual: VoiceOver reads the last word of the previous line instead.
  6. Press Voiceover+L.
    • Result: The whole line is read.
  7. Press DownArrow again. If this is the last line, the cursor will move to the very end.
    • Expected: VoiceOver reads the whole line.
    • Actual: The last word of the second line is read.

This is a recent regression I believe. Reporting it here so it gets on the radar, but am actually not able to provide a regression range because I'm still out ill.

Severity: -- → S3

Just encountered this again on Mac with current Nightly. Morgan, have you been able to reproduce this, and any leads on why this is happening?

Flags: needinfo?(mreschenberg)
Assignee: nobody → eitan

Yes I can reproduce this -- not sure what's going on here. Eitan said he'd look into it :)

Flags: needinfo?(mreschenberg)

It's quirks in how we send events. yay.

So we need to provide events with AXTextSelectionGranularityLine. Currently, if the movement is one character is length, we send AXTextSelectionGranularityCharacter, if it is larger we send AXTextSelectionGranularityWord.

I guess we can continue hacking at this and detect passing a newline boundary to report the right kind of granularity. But it gets tricky because you would need to know that the line boundary was crossed while pressing up and down and not by navigating by word/char.

I think this hack has reached its limit. We really need to take the nsSelectionAmount provided in nsFrameSelection::MoveCaret, and use it to notify the nsISelectionListener with a granularity. We should probably add direction to that if we are already at it :)

Pushed by eisaacson@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/94a6b171e91b
P1: Add granularity to selection change notification. r=smaug
https://hg.mozilla.org/integration/autoland/rev/59e51fcaa1f2
P2: Add granularity to a11y caret move events. r=morgan
https://hg.mozilla.org/integration/autoland/rev/2430eeb36caf
P3: Add more granularities to AXSelectedTextChanged events. r=morgan
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: