Previously we checked if the announcement was a child of the root acc directly, but it's not clear this worked reliably since we've done `GetObjectOrRepresentedView` for a while, which (should) return the view instead of the root acc. This patch also:
- Dispatches the announcement from NSApp instead of NSWindow, since per chrome and safari notifs fired on non-main windows get dropped
- Modifies the announcement priority from medium to high, so VO interrupts itself to speak this message (this makes the UX more consistent, since the text-inserted/text-deleted notifs from the URL bar seem to occasionally bookend the announcement)
- Updates the browser_app.js test to NOT run in headless mode, since in headless mode NSApp isn't rendered to dispatch the notification. This test contains a task for AXAnnouncementRequested via a11yUtils.announce
Differential Revision: https://phabricator.services.mozilla.com/D206083
Note that even though UIA has a dedicated HeadingLevel property, Chromium doesn't implement it and the documentation says the Level property can be used for headings as well.
Differential Revision: https://phabricator.services.mozilla.com/D207399
This revision updates newly-failing tests after implementing the ancestor
requirements for certain child roles. Generally, this revision adds ancestors
where appropriate, because tests largely are not testing this particular
behavior.
Differential Revision: https://phabricator.services.mozilla.com/D205880
This revision changes the behavior of the Role function such that, for child
roles (in parent/child role relationships), the parent role must be present as
an ancestor for the child to have its assigned role. For instance, a "row" node
must have a table in its ancestry tree. To implement this, we walk parents. This
revision also fixes up and removes expected failures for around 18 web platform
tests.
Differential Revision: https://phabricator.services.mozilla.com/D202542
This revision adds a utility function to find the nearest non-generic ancestor
for which a given predicate returns AncestorSearchOption::Found. The goal of
this function is to enable searching through ancestors, stopping when
appropriate. This is useful in a follow-up patch for finding requisite ancestors
of child role accessibility nodes.
Differential Revision: https://phabricator.services.mozilla.com/D205672
This revision implements the ARIA rowgroup role in Gecko. Previously, Gecko was
using roles::GROUPING for multiple types of groups and disambiguating them
in various places. This revision unwinds that while maintaining present
functionality.
Differential Revision: https://phabricator.services.mozilla.com/D205671
Previously we checked if the announcement was a child of the root acc directly, but it's not clear this worked reliably since we've done `GetObjectOrRepresentedView` for a while, which (should) return the view instead of the root acc. This patch also:
- Dispatches the announcement from NSApp instead of NSWindow, since per chrome and safari notifs fired on non-main windows get dropped
- Modifies the announcement priority from medium to high, so VO interrupts itself to speak this message (this makes the UX more consistent, since the text-inserted/text-deleted notifs from the URL bar seem to occasionally bookend the announcement)
- Updates the browser_app.js test to NOT run in headless mode, since in headless mode NSApp isn't rendered to dispatch the notification. This test contains a task for AXAnnouncementRequested via a11yUtils.announce
Differential Revision: https://phabricator.services.mozilla.com/D206083
Previously the `boolean` type was also declared using a `bool` typedef in
xpidl, meaning that both were used in various places. This patch standardizes
on the built-in `boolean` type, removing the typedef.
Differential Revision: https://phabricator.services.mozilla.com/D206382
Sorry for the massive patch but I found it hard to split without
introducing a bunch of copies around...
This mostly makes necko and DOM agree on which strings to use, which
should result on less copies and conversions.
Differential Revision: https://phabricator.services.mozilla.com/D205601
This revision updates newly-failing tests after implementing the ancestor
requirements for certain child roles. Generally, this revision adds ancestors
where appropriate, because tests largely are not testing this particular
behavior.
Differential Revision: https://phabricator.services.mozilla.com/D205880
This revision changes the behavior of the Role function such that, for child
roles (in parent/child role relationships), the parent role must be present as
an ancestor for the child to have its assigned role. For instance, a "row" node
must have a table in its ancestry tree. To implement this, we walk parents. This
revision also fixes up and removes expected failures for around 18 web platform
tests.
Differential Revision: https://phabricator.services.mozilla.com/D202542
This revision adds a utility function to find the nearest non-generic ancestor
for which a given predicate returns AncestorSearchOption::Found. The goal of
this function is to enable searching through ancestors, stopping when
appropriate. This is useful in a follow-up patch for finding requisite ancestors
of child role accessibility nodes.
Differential Revision: https://phabricator.services.mozilla.com/D205672
This revision implements the ARIA rowgroup role in Gecko. Previously, Gecko was
using roles::GROUPING for multiple types of groups and disambiguating them
in various places. This revision unwinds that while maintaining present
functionality.
Differential Revision: https://phabricator.services.mozilla.com/D205671
Don't conflate falsyness of AttrValueIs with the absence of an
attribute. This causes us to incorrectly fallback on the internals
value.
Differential Revision: https://phabricator.services.mozilla.com/D206061
Per the IDL, this method returns enum ProviderOptions.
Strictly speaking, that's not correct because this is actually a bit field combining values from the enum, rather than returning only a single value from the enum.
It seems some compilers are more strict about this and thus fail with an error like: assigning to 'enum ProviderOptions' from incompatible type 'int'
To work around this, static_cast the value before returning it.
Differential Revision: https://phabricator.services.mozilla.com/D205667
Aside from being a fundamental part of semantics, this is needed for our tests.
These mappings are based on the Core AAM and HTML AAM specs, plus some personal judgement where Gecko roles weren't covered by these specs.
UIA control types are rather limited and they apparently expect us to expose a lot of things using LocalizedControlType, but that isn't implemented for now.
I expect these will need to be revised in future, but this is a starting point.
Differential Revision: https://phabricator.services.mozilla.com/D205185
This identifies the root of our implementation and allows for focus querying and hit testing.
We also implement IRawElementProviderSimple::get_HostRawElementProvider to connect to UIA's HWND provider.
Differential Revision: https://phabricator.services.mozilla.com/D205182
Our IUnknownImpl macros avoid boilerplate, but they weren't designed to handle the quirky inheritance of our MSAA/UIA implementation.
Among other things, using these macros required us to override AddRef and Release in uiaRawElmProvider, which was a bit confusing.
Rather than perpetuating this weirdness as things get more complex, just implement what we need by hand.
Differential Revision: https://phabricator.services.mozilla.com/D205180
1. Respond to WM_GETOBJECT with our IRawElementProviderSimple implementation for the root Accessible of the HWND.
2. Don't allow QueryInterface to UIA interfaces if the UIA pref is disabled. This stops WM_GETOBJECT from returning our UIA implementation in this case.
3. Specify the appropriate provider options.
Differential Revision: https://phabricator.services.mozilla.com/D205179