764 Commits

Author SHA1 Message Date
Morgan Rae Reschenberg
48ff0757ca Bug 1990785: Verify text attributes exist before adding to them r=Jamie, a=RyanVM DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D266937
2025-10-03 01:41:15 +00:00
Eitan Isaacson
a5ebf1856c Bug 1975696 - Revert suppression of AXTitle introduced in bug 1901324. r=Jamie a=RyanVM
Original Revision: https://phabricator.services.mozilla.com/D261165

Differential Revision: https://phabricator.services.mozilla.com/D261203
2025-08-23 00:27:18 +00:00
Mikhail Galanin
23319d2ebb Bug 1968547 - Modify loop to for-each to avoid indexing error. r=morgan, a=dmeehan
Differential Revision: https://phabricator.services.mozilla.com/D253233
2025-06-12 21:45:24 +00:00
Mikhail Galanin
921153b34f Bug 1625915 - Expose validation error message via AXValidationError. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D214679
2025-05-22 18:19:40 +00:00
Morgan Rae Reschenberg
9c1c6ef7b9 Bug 1966243: Expose states::INVALID via moxInvalid in mozAccessible r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D249460
2025-05-20 17:52:04 +00:00
Eitan Isaacson
052a96baee Bug 1901324 - Don't give accessibles AXTitle if they have a labelling relation. r=morgan
This is a bit risky, but I hope worthwhile.

I also changed the single labelling relation check in moxTitle and moxLabel to not allocate an NSArray.

Differential Revision: https://phabricator.services.mozilla.com/D247369
2025-05-06 22:11:11 +00:00
Eitan Isaacson
18c81c366f Bug 1467382 - Support aria-keyshortcuts. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D246695
2025-04-29 16:42:31 +00:00
Eitan Isaacson
5e15843b04 Bug 1838502 - Don't expose a title for labels. r=morgan
THis is what VO expects, we apparently knew that but decided it wasn't worth fixing in the past

Differential Revision: https://phabricator.services.mozilla.com/D244050
2025-04-22 22:07:02 +00:00
Tom Schuster
b8d11d463f Bug 1951893 - Remove unneeded StaticAtom suffixes. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D240598
2025-03-11 11:36:09 +00:00
James Teh
942bed7573 Bug 1933384: GeckoTextMarker::AttributedText: Iterate by attribute boundary then text segment, rather than the other way around. r=eeejay
After bug 1927001, TextLeafRange::FindTextAttrsStart crosses container boundaries.
Because of this, iterating by segment first means we might end up calling FindTextAttrsStart more than we need to.
We can reduce this by primarily iterating using FindTextAttrsStart.
We still need to walk text segments because we need to get the text from each leaf and an attributes run might contain more than one leaf in the same container.
This also required some small tweaks to TextLeafRange::FindTextAttrsStart to correctly handle being called on a non-text Accessible.

Differential Revision: https://phabricator.services.mozilla.com/D236510
2025-02-04 23:38:23 +00:00
James Teh
8533e75f97 Bug 1938624 part 3: Map <input type="search"> and role="searchbox" to the new SEARCHBOX Gecko role. r=eeejay
1. Return this role as appropriate in HTMLTextFieldAccessible and update ARIAMap.
2. Remove Accessible::IsSearchbox, which is no longer required.
3. Remove Mac mozTextAccessible moxSubrole override. This was only used for password inputs and searchboxes, but we can now specify these subroles in the RoleMap instead.
4. Tweak the iOS code for the removal of IsSearchbox.

Differential Revision: https://phabricator.services.mozilla.com/D233230
2025-02-03 01:47:43 +00:00
Alexandru Marc
6ac9f66aa8 Backed out 5 changesets (bug 1938624) for causing multiple perma failures CLOSED TREE
Backed out changeset 7d0d375749dd (bug 1938624)
Backed out changeset d94f65a880a8 (bug 1938624)
Backed out changeset b5eb92a5953f (bug 1938624)
Backed out changeset 90842ecb4293 (bug 1938624)
Backed out changeset 7c0e1419e6b5 (bug 1938624)
2025-01-29 11:33:36 +02:00
James Teh
7e5e757737 Bug 1938624 part 3: Map <input type="search"> and role="searchbox" to the new SEARCHBOX Gecko role. r=eeejay
1. Return this role as appropriate in HTMLTextFieldAccessible and update ARIAMap.
2. Remove Accessible::IsSearchbox, which is no longer required.
3. Remove Mac mozTextAccessible moxSubrole override. This was only used for password inputs and searchboxes, but we can now specify these subroles in the RoleMap instead.
4. Tweak the iOS code for the removal of IsSearchbox.

Differential Revision: https://phabricator.services.mozilla.com/D233230
2025-01-29 04:30:51 +00:00
Florian Quèze
9609e47f62 Bug 1879329 - script generated replacement of the GleanMetrics.h includes, r=chutten,valentin,media-playback-reviewers,cookie-reviewers,anti-tracking-reviewers,profiler-reviewers,win-reviewers,rkraesig,emz,aabh,padenot.
Differential Revision: https://phabricator.services.mozilla.com/D234744
2025-01-21 11:21:45 +00:00
Eitan Isaacson
063abb1766 Bug 1938490 - Do not enforce a single root group for documents. r=morgan
I believe this was needed in previous versions of VoiceOver, but now things seem to work.
We still need the root group for aria roles on the document, but that should be it.

This greatly accelerates our VoiceOver performance.

Differential Revision: https://phabricator.services.mozilla.com/D233759
2025-01-09 21:56:02 +00:00
James Teh
7266f12f87 Bug 1932980: Expose <mark> as AXHighlight for Mac a11y. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D230353
2024-12-05 21:44:34 +00:00
serge-sans-paille
5946338a6a Bug 1920718 - Annotate all global variable with runtime initialization attributes r=glandium,application-update-reviewers,media-playback-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,gfx-reviewers,aosmond,lina,nalexander,aabh,geckoview-reviewers,win-reviewers,gstoll,m_kato
MOZ_RUNINIT => initialized at runtime
MOZ_CONSTINIT => initialized at compile time
MOZ_GLOBINIT => initialized either at runtime or compile time, depending on template parameter, macro parameter etc
This annotation is only understood by our clang-tidy plugin. It has no
effect on regular compilation.

Differential Revision: https://phabricator.services.mozilla.com/D223341
2024-10-30 11:05:24 +00:00
serge-sans-paille
262f78c07f Bug 1922838 - Replace ArrayLength, ArrayEnd and MOZ_ARRAY_LENGTH by standard alternative r=glandium,necko-reviewers,jgilbert,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,bytesized,janv,dimi,daisuke,karlt,gstoll,canaltinova,timhuang
Namely std::size, std::end and std::size. This drops C support for
MOZ_ARRAY_LENGTH but it wasn't used anyway.

Differential Revision: https://phabricator.services.mozilla.com/D224611
2024-10-28 08:21:19 +00:00
Alexandru Marc
a5eb905bf4 Backed out changeset d92f391b3b0c (bug 1922838) for backing out bug 1915351 2024-10-25 16:42:33 +03:00
serge-sans-paille
07101ac24d Bug 1922838 - Replace ArrayLength, ArrayEnd and MOZ_ARRAY_LENGTH by standard alternative r=glandium,necko-reviewers,jgilbert,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,bytesized,janv,dimi,daisuke,karlt,gstoll,canaltinova,timhuang
Namely std::size, std::end and std::size. This drops C support for
MOZ_ARRAY_LENGTH but it wasn't used anyway.

Differential Revision: https://phabricator.services.mozilla.com/D224611
2024-10-24 09:06:01 +00:00
Alexandru Marc
004e704b22 Backed out changeset 448597bce69d (bug 1922838) for causing build bustages. CLOSED TREE 2024-10-24 11:37:49 +03:00
serge-sans-paille
2c916d4973 Bug 1922838 - Replace ArrayLength, ArrayEnd and MOZ_ARRAY_LENGTH by standard alternative r=glandium,necko-reviewers,jgilbert,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,bytesized,janv,dimi,daisuke,karlt,gstoll,canaltinova,timhuang
Namely std::size, std::end and std::size. This drops C support for
MOZ_ARRAY_LENGTH but it wasn't used anyway.

Differential Revision: https://phabricator.services.mozilla.com/D224611
2024-10-24 07:38:30 +00:00
Florian Quèze
1d371b8a8e Bug 1923028 - Migrate scalars to use Glean APIs for a11.*, r=chutten.
Differential Revision: https://phabricator.services.mozilla.com/D225366
2024-10-16 20:46:06 +00:00
Eitan Isaacson
77c605f266 Bug 1915262 - Fire queued live region event from content in MacOS. r=morgan
Introduce a gecko live region changed event and fire it from within content.
This way it gets coalesced in the case of many insertions/deletions.

Also, rely on text insert/delete instead of reorder because there can be cases
where the text in a leaf changes as opposed to a tree mutation.
We get text insert/delete on mutations too, so that should cover it.

Differential Revision: https://phabricator.services.mozilla.com/D224388
2024-10-10 17:36:26 +00:00
Cosmin Sabou
74da9d50d4 Backed out changeset 3cefab965a7c (bug 1915262) for causing accessible related assertion failures on macOS. 2024-10-09 10:43:37 +03:00
Eitan Isaacson
461761b786 Bug 1915262 - Fire queued live region event from content in MacOS. r=morgan
Introduce a gecko live region changed event and fire it from within content.
This way it gets coalesced in the case of many insertions/deletions.

Also, rely on text insert/delete instead of reorder because there can be cases
where the text in a leaf changes as opposed to a tree mutation.
We get text insert/delete on mutations too, so that should cover it.

Differential Revision: https://phabricator.services.mozilla.com/D224388
2024-10-09 05:36:21 +00:00
Nathan LaPre
96df3b0894 Bug 1794974: Part 1: Add improved client detection, automatic domain setting, r=Jamie
This revision is a step towards ensuring we get the right domains for known
accessibility instantiators. We want to anticipate the needs of known clients
and make sure we have all the cache domains ready, especially for heavy-use
clients like screen readers. The domains we'll need are a bit of a work in
progress, but can be updated easily. For now, err on the side of caution. This
revision also implements better client detection on macOS, so we can handle
multiple clients.

Differential Revision: https://phabricator.services.mozilla.com/D220035
2024-09-09 23:02:19 +00:00
Eitan Isaacson
567820e77d Bug 1911518 - Don't use mozTextAccessible on container comboboxes. r=Jamie
This still does not resolve ARIA 1.0 styled boxes where the entry aria-owns the list.

Differential Revision: https://phabricator.services.mozilla.com/D218983
2024-09-03 19:23:15 +00:00
James Teh
0953c0859b Bug 1911505: Expose highlighted text to Mac a11y. r=morgan,eeejay
We do this via the undocumented AXHighlight attribute, as gleaned from the WebKit and Chromium source code.

Differential Revision: https://phabricator.services.mozilla.com/D218513
2024-08-26 02:02:46 +00:00
Eitan Isaacson
642922bc35 Bug 1772375 - Initial support for MacOS full keyboard access. r=morgan
This feature relies mostly on a search predicate key we did not support.
With that added we at least get some functionality although you encounter
bugs pretty quickly. For example a button after a password field loses focus,
but this seems to be a bug in Safari too. I think the browser support here in general
is pretty underwhelming at this time.

Note: This just works because we now start a11y when a role is retrieved, so
we don't need to sniff out any special FKA settings.

Differential Revision: https://phabricator.services.mozilla.com/D219822
2024-08-23 23:15:12 +00:00
Iulian Moraru
dbc91796ea Backed out changeset ec19883ae28f (bug 1911518) for causing browser-a11y failures on browser_range.js. CLOSED TREE 2024-08-22 21:17:48 +03:00
Eitan Isaacson
8774686fc0 Bug 1911518 - Don't use mozTextAccessible on container comboboxes. r=Jamie
This still does not resolve ARIA 1.0 styled boxes where the entry aria-owns the list.

Differential Revision: https://phabricator.services.mozilla.com/D218983
2024-08-22 17:22:27 +00:00
Narcis Beleuzu
7b808a0607 Backed out changeset 1e117d4cb718 (bug 1911505) for causing mochitests failures in browser_attributed_text.js . CLOSED TREE 2024-08-22 03:19:36 +03:00
James Teh
34cac41935 Bug 1911505: Expose highlighted text to Mac a11y. r=morgan,eeejay
We do this via the undocumented AXHighlight attribute, as gleaned from the WebKit and Chromium source code.

Differential Revision: https://phabricator.services.mozilla.com/D218513
2024-08-21 21:54:10 +00:00
Sylvestre Ledru
a3ea006705 Bug 1519636 - Reformat recent changes to the Google coding style r=emilio,necko-reviewers,geckoview-reviewers,application-update-reviewers,media-playback-reviewers,devtools-reviewers,anti-tracking-reviewers,profiler-reviewers,win-reviewers,migration-reviewers,padenot,mconley,nchevobbe,kershaw,gstoll,mstange,bytesized,m_kato
This new version of clang 17 also slightly changed the formatting.

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D215914
2024-07-17 11:15:31 +00:00
Morgan Rae Reschenberg
7fabca2608 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-06-25 23:06:08 +00:00
Eitan Isaacson
872a6b8ba9 Bug 1678712 - Support AXLangauge. r=morgan
The important part here is to have the text leafs inherit their parents' language.

Differential Revision: https://phabricator.services.mozilla.com/D212604
2024-06-11 19:41:20 +00:00
Sandor Molnar
401eda892a Backed out changeset 718208a40b89 (bug 1888310) for causing mochitest failures @ browser_app.js CLOSED TREE 2024-06-05 00:43:46 +03:00
Morgan Rae Reschenberg
9467667c1e 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-06-04 20:42:45 +00:00
Sandor Molnar
144ffaab39 Backed out changeset 29e984633f5e (bug 1888310) for causing mochitest failures @ accessible/tests/browser/mac/browser_app.js CLOSED TREE 2024-05-31 00:47:54 +03:00
Morgan Rae Reschenberg
3bfbed4b85 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-05-30 21:01:20 +00:00
Eitan Isaacson
36187c9cbf Bug 1875629 - Add AXContents to outer docs (scroll areas). r=morgan
Without this attribute VoiceOver gets into an unstable state when the cursor or focus
leaves the document.

Differential Revision: https://phabricator.services.mozilla.com/D211617
2024-05-28 20:52:51 +00:00
Morgan Rae Reschenberg
3c047cfc64 Bug 1895408: Add support for exposing critical, supoptimal, optimal meter values via AXValueDescription r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D209615
2024-05-21 22:11:05 +00:00
Morgan Rae Reschenberg
7e70f187cb Bug 1884258: Introduce mozRangeAccessible to support progress HTML element r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D204444
2024-05-02 21:50:49 +00:00
Natalia Csoregi
b746393aca 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
3c3e5bbbf7 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
Mike Hommey
349a5e5ccb 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
Cristian Tuns
aef8341baa 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
23960c2898 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
James Teh
2e9ea0c1aa 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