Open Bug 1570500 Opened 5 years ago Updated 2 years ago

Missing state-changed:checked events for toggling state of one-click search engine in Nightly

Categories

(Firefox :: Disability Access, defect, P3)

defect

Tracking

()

People

(Reporter: jdiggs, Unassigned, Mentored)

References

(Blocks 3 open bugs)

Details

(Whiteboard: [lang=c++])

Attachments

(1 file)

Attached file state-changed.py (deleted) —

Steps to reproduce:

  1. Launch Nightly and navigate to about:preferences#search
  2. Move focus to the list of one-click search engines (the list where you can toggle a given engine with the space bar)
  3. Launch the attached pyatspi accessible-event listener
  4. Use space to toggle the checkbox for a given search engine
  5. Up/Down Arrow to a different search engine
  6. Use space to toggle the checkbox for that newly selected search engine

Expected results: Events would be printed out by the listener for two different occurrences:

  1. When the selected item changes
  2. When the checkbox appears/disappears

Actual results: Events are only printed out by the listener when the selected item changes.

Note that the table cell which displays the checkmark exposes state checkable in the accessible state set, and if the checkmark is present the cell also has state checked in its state set. Thus the only thing which appears missing is emitting the state change events to let Orca know when that checked state has been toggled.

The things which actually get focus in that table are the rows. The checkable cells are children of those rows, but aren't themselves focusable. Will Orca report a state change on the cell even though the row is what has focus?

Flags: needinfo?(jdiggs)

It might not do so yet, but if you make this change and it doesn't, I can update Orca to handle this particular case.

Flags: needinfo?(jdiggs)

Implementation note: This is going to be a bit tricky to fix. The Accessibles for XUL tree rows and cells don't correspond to actual Elements. Instead, they're all backed by the tree Element and they use the nsITreeView interface to query for cell values, etc. So, we can't just watch for events from an Element.

I think we're going to need to fire a custom event on the tree Element when the value changes, including the row and column numbers as properties on the event. A11y can catch this and fire the event on the appropriate cell Accessible. I think we could fire this here:
https://searchfox.org/mozilla-central/rev/29cce9a2684ef64c4f1f996087da8b7545d31f65/toolkit/content/widgets/tree.js#62
See RootAccessible::HandleTreeRowCountChangedEvent for an example of getting properties out of an event:
https://searchfox.org/mozilla-central/rev/29cce9a2684ef64c4f1f996087da8b7545d31f65/accessible/generic/RootAccessible.cpp#635

Blocks: xula11y
Priority: -- → P3
Blocks: eventa11y
Mentor: jteh
Whiteboard: [lang=c++]
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: