Open Bug 1588159 Opened 5 years ago Updated 2 years ago

investigate weather RootAccessible has to listen untrusted events

Categories

(Core :: Disability Access APIs, task, P3)

task

Tracking

()

People

(Reporter: surkov, Unassigned)

References

Details

RootAccessible listens untrusted events, which was used to make XBL widgets working. I'm not sure weather we need to rely on untrusted events anymore in post-XBL world, so this part could be possibly removed.

If not, then then the comment should be updated, by removing mentioning XBL here https://searchfox.org/mozilla-central/source/accessible/generic/RootAccessible.cpp#162-164.

What's worth to try is to assert in RootAccessible when untrusted event is handled, and run the build for a while with screen reader on (it also make sense to run tests but not sure whether a11y has trustworthy coverage for this code).

Does "untrusted" here refer to the same thing as Event.isTrusted? If so, I think we still need these for some XUL controls which fire a11y events from JS; e.g. richlistbox, tree, radio.

Flags: needinfo?(surkov.alexander)
Priority: -- → P3

(In reply to James Teh [:Jamie] from comment #1)

Does "untrusted" here refer to the same thing as Event.isTrusted? If so, I think we still need these for some XUL controls which fire a11y events from JS; e.g. richlistbox, tree, radio.

right, we do have JS things like checkboxes [1], however the comment says [2] that the only JS non-chrome things generate those, I'm curious if we have XUL elements living in-content.

Brian, does it sound like a plausible thing?

[1] https://searchfox.org/mozilla-central/source/toolkit/content/widgets/checkbox.js#75
[2] https://searchfox.org/mozilla-central/source/accessible/generic/RootAccessible.cpp#164-165

Flags: needinfo?(surkov.alexander) → needinfo?(bgrinstead)

(In reply to alexander :surkov (:asurkov) (pto) from comment #2)

(In reply to James Teh [:Jamie] from comment #1)

Does "untrusted" here refer to the same thing as Event.isTrusted? If so, I think we still need these for some XUL controls which fire a11y events from JS; e.g. richlistbox, tree, radio.

right, we do have JS things like checkboxes [1], however the comment says [2] that the only JS non-chrome things generate those, I'm curious if we have XUL elements living in-content.

Brian, does it sound like a plausible thing?

[1] https://searchfox.org/mozilla-central/source/toolkit/content/widgets/checkbox.js#75
[2] https://searchfox.org/mozilla-central/source/accessible/generic/RootAccessible.cpp#164-165

Sorry for the delay. We do have xul elements living in content, but very few (things like scrollbars and resizers). Only things that are styled in: https://searchfox.org/mozilla-central/source/toolkit/content/minimal-xul.css. Specifically things that are whitelisted here https://searchfox.org/mozilla-central/rev/2a355e56c490768be676689de18629485c9d699b/dom/xul/nsXULElement.cpp#614-631 (minus <xul:label> which shouldn't be in that list anymore).

Lokoing at kEventTypes in https://searchfox.org/mozilla-central/rev/2a355e56c490768be676689de18629485c9d699b/accessible/generic/RootAccessible.cpp#139-159 I don't think that any of those in-content elements fire those events. It would be best to double check with a DOM peer though.

Flags: needinfo?(bgrinstead)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.