Closed Bug 1653421 Opened 4 years ago Closed 4 years ago

Add data to text value change events in mac


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




Tracking Status
firefox80 --- fixed


(Reporter: eeejay, Assigned: eeejay)



(Whiteboard: [mac2020_1])


(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

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
Part 1: Refactor AccessibleWrap event handling. r=morgan
Part 2: Add attributed string for range getter. r=morgan
Part 3: Don't normalize marker beyond editable root. r=morgan
Part 4: Pass data with text value change events. r=morgan
Part 5: Add xpc mac event interface so we can include data. r=morgan
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.