Otherwise, if we're replacing a previous top level doc, we might refer to the old top level doc during initialization.
Differential Revision: https://phabricator.services.mozilla.com/D79398
When window emulation is enabled, the emulated window is set on the top level DocAccessibleChild.
However, it isn't set on child documents (in-process iframes).
Therefore, when querying the window handle, we need to check for an emulated window handle on the top level document and return that if present.
This fixes the window handle returned by IAccessible2::get_windowHandle.
Note that the window handle used when firing events was already correct, as that is determined in the parent process.
In the parent process, the emulated window was already being propagated down to child DocAccessibleParents by BrowserParent::RecvPDocAccessibleConstructor.
Differential Revision: https://phabricator.services.mozilla.com/D79035
This usage of nsIDocShellTreeItem is safe, but nsIDocShellTreeItem is going away and it's trivial to convert this to use BrowsingContext.
As a bonus, the code is also shorter and more readable.
Differential Revision: https://phabricator.services.mozilla.com/D79022
This also adds some assertions where these are used in the Windows code, as it would be bad if that code ran in an OOP iframe document.
Differential Revision: https://phabricator.services.mozilla.com/D79021
According to SVG Accessibility API Mappings, an SVG element which has title or desc element must be exposed.
https://w3c.github.io/svg-aam/#include_elements
Previously, we didn't expose <g> elements at all even if they had a title/desc, and we unconditionally exposed some other SVG elements even when they didn't.
This removes the Dev Tools A11y Panel code which explicitly allowed unlabelled descendants of role="img" <svg> elements, since we don't create descendants if they don't have a label now anyway.
The associated tests had to be tweaked as well, since now we don't create unlabelled descendants.
Original patch by Takeshi Kurosawa.
Differential Revision: https://phabricator.services.mozilla.com/D77763
According to SVG Accessibility API Mappings, an SVG element which has title or desc element must be exposed.
https://w3c.github.io/svg-aam/#include_elements
Previously, we didn't expose <g> elements at all even if they had a title/desc, and we unconditionally exposed some other SVG elements even when they didn't.
Original patch by Takeshi Kurosawa.
Differential Revision: https://phabricator.services.mozilla.com/D77763
Also update documentation to suggest using the `GeneratedFile` template rather than directly referencing `GENERATED_FILES` where possible.
Differential Revision: https://phabricator.services.mozilla.com/D77496
A casualty of this is the "switch" action description for pressing tabs. That code
goes way back to our first Mac a11y support. WebKit and Chromium don't have it.
I tried to figure out when other browsers or apps had that with no luck.
Anyway, removing that description gives us the same behavior in VO as
WebKit and Chromium where there are no custom action description strings.
Differential Revision: https://phabricator.services.mozilla.com/D77342
A casualty of this is the ability to change listed attribute names on the fly.
I think this is the right choice in general and doesn't seem to affect VO.
If we run into a case where it does we should reconsider.
Differential Revision: https://phabricator.services.mozilla.com/D77341
Keeping accessibilityAttributeNames because it calls additionalAccessibilityAttributeNames
which is used by subclasses.
Differential Revision: https://phabricator.services.mozilla.com/D77335