Commit Graph

11077 Commits

Author SHA1 Message Date
Natalia Csoregi
df9e767660 Backed out 2 changesets (bug 1888310, bug 1884625) for causing failures on browser_app.js. CLOSED TREE
Backed out changeset 8036a50c0751 (bug 1884625)
Backed out changeset 8c8df548d15d (bug 1888310)
2024-04-17 22:37:32 +03:00
Morgan Rae Reschenberg
97e92caade Bug 1888310: Verify a11y-announcement is a child of ChildView instead of mozRootAccessible r=eeejay
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
2024-04-17 18:20:48 +00:00
James Teh
20f5c199f0 Bug 1887788 part 2: Implement the UIA ClassName property. r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D207507
2024-04-17 03:32:17 +00:00
James Teh
869842129f Bug 1887788 part 1: Add Accessible::DOMNodeClass to get the DOM class without all the other work in Accessible::Attributes. r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D207512
2024-04-17 03:32:16 +00:00
James Teh
61d13ab945 Bug 1887787: Implement the UIA FrameworkId property. r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D207505
2024-04-16 04:58:56 +00:00
Mike Hommey
e9ebcb387c Bug 1890922 - Use the unused rootGroup variable. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D207233
2024-04-16 01:05:41 +00:00
James Teh
9cd86f5e84 Bug 1887784: Implement the UIA Level, PositionInSet and SizeOfSet properties. r=nlapre
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
2024-04-15 22:34:27 +00:00
Christoph Kerschbaumer
505b8abc1f Bug 1888394: Update tests within accessible/ to work with https-first enabled, r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D207271
2024-04-15 09:40:18 +00:00
Mike Hommey
7c5cdb53a9 Bug 1890924 - Avoid the proxy variable being found unused on Windows . r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D207235
2024-04-11 06:36:20 +00:00
Nathan LaPre
2ec98e1558 Bug 1849160 - Part 4: Update tests in light of new ancestor role requirements, r=Jamie,devtools-reviewers,nchevobbe,geckoview-reviewers,ohall
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
2024-04-10 17:22:14 +00:00
Nathan LaPre
9f61225ecc Bug 1849160 - Part 3: Orphaned child accessibles fall back to native role, r=Jamie
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
2024-04-10 17:22:13 +00:00
Nathan LaPre
e9a44ec52c Bug 1849160 - Part 2: Add Accessible::FindAncestorIf, r=Jamie
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
2024-04-10 17:22:13 +00:00
Nathan LaPre
71fd3eb9cb Bug 1849160 - Part 1: Implement rowgroup role, r=Jamie
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
2024-04-10 17:22:12 +00:00
Cristian Tuns
675389b96b Backed out changeset c9a46c22d5ff (bug 1888310) for causing build bustages in mozAccessible.mm CLOSED TREE 2024-04-09 14:55:38 -04:00
Morgan Rae Reschenberg
96c6a3f35c Bug 1888310: Verify a11y-announcement is a child of ChildView instead of mozRootAccessible r=eeejay
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
2024-04-09 18:20:31 +00:00
Amit Prakash Ambasta
1a34bf9361 Bug 1889054 - Fix issues with non-unified builds missing header inclusions. r=emilio
Signed-off-by: Amit Prakash Ambasta <amit.prakash.ambasta@gmail.com>

Differential Revision: https://phabricator.services.mozilla.com/D207004
2024-04-09 12:09:53 +00:00
James Teh
e84478d977 Bug 1887780 part 2: Implement the UIA Value pattern. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D206449
2024-04-05 00:19:23 +00:00
James Teh
0d51bb4e69 Bug 1887780 part 1: Add UIA test harness utility to test that a Python function call raises an exception. r=morgan
There should be no functional change here, but it reduces duplicate boilerplate, now and in future.

Differential Revision: https://phabricator.services.mozilla.com/D206450
2024-04-05 00:19:23 +00:00
Nika Layzell
a48079cd72 Bug 1881863 - Part 1: Standardize on boolean over bool in xpidl, r=xpcom-reviewers,necko-reviewers,valentin,extension-reviewers,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,search-reviewers,anti-tracking-reviewers,places-reviewers,nalexander,emilio,zombie,sgalich,karlt,lina,Standard8
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
2024-04-04 18:45:21 +00:00
Emilio Cobos Álvarez
e4ddf24147 Bug 1887719 - More consistently use UTF8String/nsCString for URLs. r=necko-reviewers,webidl,anti-tracking-reviewers,places-reviewers,jari,kershaw,janv,smaug,hsivonen
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
2024-04-04 11:49:57 +00:00
Stanca Serban
2c30246b2d Backed out changeset 1e349279000c (bug 1888394) for causing mochitests failures. 2024-04-04 03:55:25 +03:00
James Teh
2d6b956c61 Bug 1889290: Implement the UIA IsEnabled property. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D206459
2024-04-03 23:32:44 +00:00
Christoph Kerschbaumer
984109aa14 Bug 1888394: Update tests within accessible/ to work with https-first enabled, r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D206006
2024-04-03 21:44:51 +00:00
James Teh
e274b95ebd Bug 1887782: Implement the UIA ScrollItem pattern. r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D205785
2024-04-03 03:40:39 +00:00
Natalia Csoregi
5824f64258 Backed out changeset 2dd2d24044af (bug 1887782) for causing bustage on uiaRawElmProvider.cpp CLOSED TREE 2024-04-03 05:01:04 +03:00
James Teh
d23342d3a1 Bug 1887782: Implement the UIA ScrollItem pattern. r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D205785
2024-04-02 21:50:48 +00:00
James Teh
a362714f8a Bug 1887777: Implement the UIA ExpandCollapse pattern. r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D205676
2024-04-02 05:53:44 +00:00
Norisz Fay
9115fe463b Backed out 4 changesets (bug 1849160) for causing gv-junit failure on AccessibilityTest#testSelectable CLOSED TREE
Backed out changeset 0fb937f8c362 (bug 1849160)
Backed out changeset fe5651e406e5 (bug 1849160)
Backed out changeset 8f14ad3ed8b4 (bug 1849160)
Backed out changeset 9a745f454db2 (bug 1849160)
2024-04-02 07:32:11 +03:00
Nathan LaPre
8881c16a5b Bug 1849160 - Part 4: Update tests in light of new ancestor role requirements, r=Jamie,devtools-reviewers,nchevobbe
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
2024-04-02 02:17:39 +00:00
Nathan LaPre
c753978e05 Bug 1849160 - Part 3: Orphaned child accessibles fall back to native role, r=Jamie
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
2024-04-02 02:17:38 +00:00
Nathan LaPre
69764d5ef9 Bug 1849160 - Part 2: Add Accessible::FindAncestorIf, r=Jamie
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
2024-04-02 02:17:38 +00:00
Nathan LaPre
dcf1ffa60a Bug 1849160 - Part 1: Implement rowgroup role, r=Jamie
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
2024-04-02 02:17:38 +00:00
Eitan Isaacson
4dc276cbbd Bug 1886227 - Always use element's ARIA attribute if one is defined. r=morgan
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
2024-03-28 23:59:56 +00:00
James Teh
2ac0262f68 Bug 1886711: Implement the UIA Toggle pattern. r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D205552
2024-03-27 00:36:29 +00:00
James Teh
ccdaa5c364 Bug 1887579: Implement the UIA FullDescription property. r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D205537
2024-03-26 10:53:42 +00:00
James Teh
bf353f3ed5 Bug 1886709 part 2: Implement the UIA Invoke pattern. r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D205432
2024-03-26 04:25:41 +00:00
James Teh
116d79df30 Bug 1886709 part 1: Teach the test harness how to listen for generic UIA automation events and get UIA control pattern interfaces. r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D205431
2024-03-26 04:25:41 +00:00
James Teh
6a3e14495b Bug 1887590: static_cast when returning in uiaRawElmProvider::get_ProviderOptions. r=nlapre
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
2024-03-26 03:36:57 +00:00
James Teh
ad359a1e5d Bug 1886619 part 2: Implement UIA Name property and fire event when it changes. r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D205295
2024-03-25 22:31:14 +00:00
James Teh
85efef0ff1 Bug 1886619 part 1: Teach the test harness how to listen for UIA property changed events. r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D205294
2024-03-25 22:31:13 +00:00
James Teh
e9194b79e4 Bug 1886618 part 2: Implement UIA focus event and properties. r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D205284
2024-03-25 11:55:32 +00:00
James Teh
db2987a0a1 Bug 1886618 part 1: Teach the test harness how to listen for UIA events. r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D205283
2024-03-25 11:55:31 +00:00
James Teh
47a0a01e1f Bug 1886371 part 8: Tweak the test harness so that it uses native UIA when it is enabled. r=nlapre
See the code comments for explanation.

Differential Revision: https://phabricator.services.mozilla.com/D205186
2024-03-25 03:28:06 +00:00
James Teh
d805d7227b Bug 1886371 part 7: Implement UIA ControlType property. r=nlapre
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
2024-03-25 03:28:06 +00:00
James Teh
55684ad8e9 Bug 1886371 part 6: Add UIA control types to RoleMap. r=nlapre
The actual ControlType property implementation is the subject of a subsequent patch.

Differential Revision: https://phabricator.services.mozilla.com/D205184
2024-03-25 03:28:05 +00:00
James Teh
a93f20a1ad Bug 1886371 part 5: Implement the UIA AutomationId property. r=nlapre
We need this for our tests so they can find elements they're testing.

Differential Revision: https://phabricator.services.mozilla.com/D205183
2024-03-25 03:28:05 +00:00
James Teh
12770de85d Bug 1886371 part 4: Implement IRawElementProviderFragmentRoot. r=nlapre
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
2024-03-25 03:28:05 +00:00
James Teh
a518e894f6 Bug 1886371 part 3: Implement IRawElementProviderFragment. r=nlapre
This is how UIA traverses the tree.

Differential Revision: https://phabricator.services.mozilla.com/D205181
2024-03-25 03:28:04 +00:00
James Teh
72ff2b7583 Bug 1886371 part 2: Refactor uiaRawElmProvider::QueryInterface. r=nlapre
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
2024-03-25 03:28:04 +00:00
James Teh
0ea4812cf2 Bug 1886371 part 1: Hook up our native UIA tree. r=nlapre,win-reviewers,rkraesig
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
2024-03-25 03:28:03 +00:00