Closed Bug 1653421 Opened 3 years ago Closed 3 years ago

Add data to text value change events in mac

Categories

(Core :: Disability Access APIs, defect, P1)

All
macOS
defect

Tracking

()

RESOLVED FIXED
mozilla80
Tracking Status
firefox80 --- fixed

People

(Reporter: eeejay, Assigned: eeejay)

References

Details

(Whiteboard: [mac2020_1])

Attachments

(6 files)

In order to hear key echos as current word typed in VoiceOver, we need to send data with the accessibility notification. This is a dictiuonary object with the following structure:

  • AXTextChangeElement: The source element of the change (ie. the text control).
  • AXTextStateChangeType: A member of the AXTextStateChangeType enum. This should be AXTextStateChangeTypeEdit for text editing.
  • AXTextChangeValues: This is an array of changes represented in this event. There can be several changes in one event, for example a paste that replaces text would have a delete followed by an insertion. Our text events don't support that. So it will always be a single element list.
    • AXTextEditType: A member of the AXTextEditType enum. There may be a need for more nuance in the future, but for now insertions should be AXTextEditTypeTyping and deleting should be AXTextEditTypeDelete.
    • AXTextChangeValue: The string delta representing the change
    • AXTextChangeValueStartMarker: A text marker at the start of the insertion/deletion.
Priority: P2 → P1

I split the switch statement into two: the first switch determines the
MOX target accessible. The second one does all the rest. This makes it more
readable and scalable when we add more events that need to be accompanied with
data.

Depends on D83680

This doesn't actually add any attributes yet.
VoiceOver uses this instead of the plain string equivalent.

Depends on D84053

When in an editable container, text markers are expected to not go past or before the editable root.

Depends on D84054

Pushed by eisaacson@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/daeda032926d
Part 1: Refactor AccessibleWrap event handling. r=morgan
https://hg.mozilla.org/integration/autoland/rev/1d37ebf3d20c
Part 2: Add attributed string for range getter. r=morgan
https://hg.mozilla.org/integration/autoland/rev/5972532c7737
Part 3: Don't normalize marker beyond editable root. r=morgan
https://hg.mozilla.org/integration/autoland/rev/f8de624ccd8a
Part 4: Pass data with text value change events. r=morgan
https://hg.mozilla.org/integration/autoland/rev/cec6fc78de0e
Part 5: Add xpc mac event interface so we can include data. r=morgan
https://hg.mozilla.org/integration/autoland/rev/88708e164b1a
Part 6: Introduce tests for text change events. r=morgan
Regressions: 1654444

Eitan, can you take a look?

Flags: needinfo?(eitan)
Regressions: 1654601
Flags: needinfo?(eitan)
You need to log in before you can comment on or make changes to this bug.