741 Commits

Author SHA1 Message Date
Eitan Isaacson
949bd3acfe 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
b2778dfb92 Backed out changeset 3cefab965a7c (bug 1915262) for causing accessible related assertion failures on macOS. 2024-10-09 10:43:37 +03:00
Eitan Isaacson
4d81a9a27a 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
b32ecd1bf9 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
dfeb809e68 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
69b36e34e7 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
18aaf8210f 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
f44e7c6f95 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
cb942059a2 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
776a4c428b 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
32cdecbd20 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
45030f6970 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
edd342a116 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
2bbd949eff 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
5c4d387874 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
4e0ffe1a17 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
44cb202bdf 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
9a72ddca2b 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
2315714492 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
62ce834ce8 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
00e1715f0d 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
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
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
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
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
Eitan Isaacson
6b7a14d337 Bug 1876150 - Filter out collapsed XUL menus when concatinating text ranges. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D205391
2024-03-22 21:30:32 +00:00
Morgan Rae Reschenberg
fcda9357b6 Bug 1884733: Add support for HTML placeholder, aria-placeholder via AXPlaceholderValue r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D204438
2024-03-20 22:46:18 +00:00
Norisz Fay
edd0ecc8d9 Backed out changeset bb96cef2989d (bug 1884733) for causing ba failure on browser_aria_placeholder.js CLOSED TREE 2024-03-13 01:58:53 +02:00
Morgan Rae Reschenberg
4aef1484e0 Bug 1884733: Add support for HTML placeholder, aria-placeholder via AXPlaceholderValue r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D204438
2024-03-12 23:09:47 +00:00
Eitan Isaacson
49fbd63cf8 Bug 1861211 - Make isAccessibilityElement conditional on a per-role basis. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D191882
2024-03-04 21:19:09 +00:00
Gabriele Svelto
aa43fa218e Bug 1831092 - Use the new pull-based API for all crash annotations and remove the global annotations table r=jgilbert,necko-reviewers,media-playback-reviewers,profiler-reviewers,win-reviewers,padenot,handyman,afranchuk,valentin,alwu,sotaro
This changes comes with several different refactorings all rolled into one,
unfotunately I couldn't find a way to pull them apart:
- First of all annotations now can either recorded (that is, we copy the value
  and have the crash reporting code own the copy) or registered. Several
  annotations are changed to use this functionality so that we don't need to
  update them as their value change.
- The code in the exception handler is modified to read the annotations from
  the mozannotation_client crate. This has the unfortunate side-effect that
  we need three different bits of code to serialize them: one for annotations
  read from a child process, one for reading annotations from the main process
  outside of the exception handler and one for reading annotations from the
  main process within the exception handler. As we move to fully
  out-of-process crash reporting the last two methods will go away.
- The mozannotation_client crate now doesn't record annotation types anymore.
  I realized as I was working on this that storing types at runtime has two
  issues: the first one is that buggy code might change the type of an
  annotation (that is record it under two different types at two different
  moments), the second issue is that types might become corrupt during a
  crash, so better enforce them at annotation-writing time. The end result is
  that the mozannotation_* crates now only store byte buffers, track the
  format the data is stored in (null-terminated string, fixed size buffer,
  etc...) but not the type of data each annotation is supposed to contain.
- Which brings us to the next change: concrete types for annotations are now
  enforced when they're written out. If an annotation doesn't match the
  expected type it's skipped. Storing an annotation with the wrong type will
  also trigger an assertion in debug builds.

Differential Revision: https://phabricator.services.mozilla.com/D195248
2024-03-04 10:24:43 +00:00
Brad Werth
05c741a534 Bug 1876392: Ensure selector existence in MOXAccessibleBase moxUnignoredParent. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D199585
2024-02-08 17:43:09 +00:00
Brad Werth
50561a75dc Bug 1876180: Make MOXAccessibleBase moxFindAncestor check for selector moxUnignoredParent before calling it. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D199432
2024-01-23 23:54:17 +00:00
Frédéric Wang
c1463070d9 Bug 1871361 - Fix typo "recieved" in accessibility code. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D197062
2024-01-05 07:32:39 +00:00
James Teh
447aa32c0e Bug 1862802 part 1: Provide an argument to PlatformCaretMoveEvent specifying whether the event was caused by user input. r=eeejay
This is needed in order to support find in page on Android using remote caret events instead of virtual cursor change events.

Depends on D192641

Differential Revision: https://phabricator.services.mozilla.com/D192642
2023-11-29 03:53:19 +00:00
Butkovits Atila
1cb12b49dd Backed out 5 changesets (bug 1862802) for causing multiple failures. CLOSED TREE
Backed out changeset 786805a2cdcc (bug 1862802)
Backed out changeset effe12f2120a (bug 1862802)
Backed out changeset 7488e7ba80c5 (bug 1862802)
Backed out changeset 3d0747ce0174 (bug 1862802)
Backed out changeset d1558d374cef (bug 1862802)
2023-11-29 03:10:17 +02:00
James Teh
cfdccbd78f Bug 1862802 part 1: Provide an argument to PlatformCaretMoveEvent specifying whether the event was caused by user input. r=eeejay
This is needed in order to support find in page on Android using remote caret events instead of virtual cursor change events.

Depends on D192641

Differential Revision: https://phabricator.services.mozilla.com/D192642
2023-11-28 22:03:19 +00:00
Eitan Isaacson
95dcf00cc5 Bug 1862999 - Introduce support for AXARIAPosInSet and AXARIASetSize. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D192887
2023-11-07 22:24:23 +00:00
Eitan Isaacson
a8213d2010 Bug 1845364 - Enable a11y in MacOS when role is requested from application. r=morgan
This is needed for Voice Control. Apple recommends it, and Chromium does this. In the future we may choose to have a more "basic" a11y mode toggled here that isn't as extensive as what we have for VoiceOver.

I couldn't figure out a way to detect Voice Control so we could include it in the telemetry/crash reporting.

Differential Revision: https://phabricator.services.mozilla.com/D184523
2023-10-31 17:03:34 +00:00
Magnus Melin
f7eab3bd11 Bug 1850643 - Fix crash in [@ -[mozTableCellAccessible moxColumnHeaderUIElements]]. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D187763
2023-09-13 06:43:24 +00:00
Mike Hommey
633e2ac6ba Bug 1851946 - Remove outdated mac SDK-version checks. r=mac-reviewers,media-playback-reviewers,bradwerth,alwu
Now that the minimum supported version of the mac SDK is 13.3, all the
macro-based checks for SDK versions older than that are always false.
Remove them.

Differential Revision: https://phabricator.services.mozilla.com/D187639
2023-09-08 01:44:07 +00:00
Eitan Isaacson
20819d2182 Bug 1845614 - Null check accessible before getting attributes. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D184639
2023-08-04 17:11:45 +00:00
Eitan Isaacson
0135568045 Bug 1846312 - Use AXAttachment to represent non-text controls in an attributed string. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D184958
2023-08-04 17:11:23 +00:00
James Teh
23fd30a006 Bug 1845883: Remove HyperTextAccessibleWrap. r=nlapre
This is now just an alias for HyperTextAccessible on all platforms.
This was done with the following bash script:

```
cd accessible
find -name HyperTextAccessibleWrap.h -delete
sed -i 's/#include "HyperTextAccessibleWrap.h"/#include "HyperTextAccessible.h"/;/"HyperTextAccessibleWrap.h",/d;s/HyperTextAccessibleWrap/HyperTextAccessible/g' `git grep -l HyperTextAccessibleWrap`
```

Differential Revision: https://phabricator.services.mozilla.com/D184796
2023-08-02 01:42:17 +00:00
James Teh
c68c3ca8b3 Bug 1844238 part 1: Change includes of Role.h to mozilla/a11y/Role.h. r=eeejay
Role.h will soon be generated, but it is generated within the obj dir, so local includes won't work.
Our C++ style guide says we should prefer exported includes wherever possible anyway.

This was done with this shell command inside the accessible/ directory:

```
sed -i 's,#include "Role.h",#include "mozilla/a11y/Role.h",' `git grep -l '#include "Role.h"'`
```

Differential Revision: https://phabricator.services.mozilla.com/D183940
2023-07-26 02:19:41 +00:00
James Teh
7c63b7fc05 Bug 1694573 part 5: Make LocalAccessible call Platform*Event. Remove most of the platform HandleAccEvent overrides. r=eeejay
Mac and Android still override HandleAccEvent for platform specific behaviour other than firing the event.
The Android behaviour can be unified properly in future work.

ATK is the platform layer with the most churn because there were inconsistencies in the way local and remote events were handled.
I'm reasonably sure these were unintentional inconsistencies, so I've done my best to unify them.

Differential Revision: https://phabricator.services.mozilla.com/D183704
2023-07-19 02:56:54 +00:00
James Teh
4458083853 Bug 1694573 part 4: Make PlatformTextSelectionEvent take TextRange instead of TextRangeData. r=eeejay
TextRangeData is specific to IPDL and thus RemoteAccessible.

Differential Revision: https://phabricator.services.mozilla.com/D183703
2023-07-19 02:56:54 +00:00
James Teh
4d2410a13e Bug 1694573 part 2: Make Platform*Event functions take Accessible instead of RemoteAccessible. r=eeejay
Some of these methods don't yet handle LocalAccessible properly, but that will be fixed in subsequent patches.

Differential Revision: https://phabricator.services.mozilla.com/D183701
2023-07-19 02:56:53 +00:00