Граф коммитов

10962 Коммитов

Автор SHA1 Сообщение Дата
Greg Stoll 6b9e711a99 Bug 1871135 - Add content analysis support to clipboard operations r=edgar,nika,masayuki,devtools-reviewers
When content analysis is on, pastes will be checked by the CA
agent while tab input is blocked. The synchronous nsIClipboard.getData()
method must block until the analysis result is received, so this
requires doing a SpinEventLoopUntil.

Differential Revision: https://phabricator.services.mozilla.com/D196997
2024-02-13 11:26:48 +00:00
James Teh de58806e45 Bug 1870783 part 5: Expose DETAILS and DETAILS_FOR relations for popovers and their invokers. r=eeejay
Even when there is a valid popovertarget, per the spec, these relations must not be exposed in certain cases.
This requires some special case code.
The code for calculating the DETAILS relation for popover invokers has been encapsulated in its own function.
We also use this to validate the reverse DETAILS_FOR relation on popovers.

Normally, when pushing cached relations to the parent process, we use IDRefsIterator so that we don't push implicit reverse relations.
For popover invokers, this wouldn't validate the other conditions.
To avoid duplicate special case code in RemoteAccessible, we use RelationByType for the DETAILS relation instead of IDRefsIterator when pushing the cache.
This leverages the LocalAccessible special case code for popover invokers.
This is fine for the DETAILS relation because nothing ever exposes an implicit reverse DETAILS relation.

Differential Revision: https://phabricator.services.mozilla.com/D199954
2024-02-12 06:24:16 +00:00
James Teh f2b94d8123 Bug 1870783 part 4: Fire state change events on all popover invokers. r=eeejay
A popover can have multiple invoker buttons.
Previously, we only fired a state change event on the button which was invoked.
This meant that the cached expanded/collapsed state of any other invokers was stale.
To facilitate this:

1. Add popovertarget to DocAccessible's kRelationAttrs so that we track reverse relationships. This will also later be used for exposing relations.
2. When an Accessible is shown or hidden, if it is a popover, use RelatedAccIterator to get all the invokers and fire appropriate state change events on each of them.
3. This also means we can get rid of nsAccessibilityService::PopovertargetMaybeChanged, since this explicit notification from DOM is no longer useful.
4. Add popovertarget to LocalAccessible::AttributeChangesState so that we fire an event for the expandable/expanded/collapsed state change if appropriate when that attribute is changed.

Differential Revision: https://phabricator.services.mozilla.com/D199842
2024-02-12 06:24:15 +00:00
James Teh adc647d267 Bug 1870783 part 3: Do not expose expanded/collapsed state for a popover invoker if the popover is an ancestor of the invoker. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D197039
2024-02-12 06:24:15 +00:00
James Teh 4f57a512d7 Bug 1870783 part 2: Expose ispopup object attribute. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D197038
2024-02-12 06:24:15 +00:00
James Teh 1c409d8fcf Bug 1870783 part 1: Expose a minimum role of GROUPING for popovers. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D196944
2024-02-12 06:24:14 +00:00
Nathan LaPre 5e6c99f2ed Bug 1732306 - Part 4: Implement generic role mapping, r=Jamie
This revision 'implements' the 'generic' ARIA role mapping by mapping ARIA
'generic' to Gecko 'section.' This isn't a full implementation of 'generic' - it
sidesteps it to avoid dealing with larger 'generic' issues (namely: that there
are multiple roles that are 'generic' in Gecko currently). We'll sort that out
in a later commit. This revision adds a new web platform test to verify that the
generic role actually overrides an element's implicit role.

Differential Revision: https://phabricator.services.mozilla.com/D200133
2024-02-08 17:49:42 +00:00
Nathan LaPre 447963adb2 Bug 1732306 - Part 3: Implement time role mappings, r=Jamie
This revision adds role mappings for the 'time' ARIA role by implementing HTML
markup mapping, adding platform mappings, and adding the role info itself. This
revision also enables the previously-failed wpt tests and fixes other tests.

Differential Revision: https://phabricator.services.mozilla.com/D200132
2024-02-08 17:49:42 +00:00
Nathan LaPre db33b5dc13 Bug 1732306 - Part 2: Implement strong role mappings, r=Jamie
This revision implements mapping for the ARIA 1.2 'strong' role by adding a
markup mapping, a role definition, and platform mappings. This revision also
removes the expected failures in the wpt test suite and fixes other tests.

Differential Revision: https://phabricator.services.mozilla.com/D200131
2024-02-08 17:49:41 +00:00
Nathan LaPre 61034e5b74 Bug 1732306 - Part 1: Implement emphasis role mappings, r=Jamie
This revision implements the mapping for the ARIA 1.2 emphasis role, which was
unsupported in Firefox until now. This change addresses a web platform test
failure. To accomplish this, the revision adds the WAI-defined role, adds a role
enum value, adds platform mappings, and adds a markup role mapping. The change
requires a new static atom for the word "emphasis," also added in this revision.
Finally, this change removes the expected wpt failure and updates other tests.

Differential Revision: https://phabricator.services.mozilla.com/D200130
2024-02-08 17:49:41 +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
Morgan Rae Reschenberg 204d3a2ffe Bug 1878950: Add link to FF HCM pref r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D200872
2024-02-08 01:36:00 +00:00
Iulian Moraru db55ffffda Backed out 4 changesets (bug 1732306) for causing osx browser-a11y failures on browser_text_basics.js. CLOSED TREE
Backed out changeset 55e194f1c92d (bug 1732306)
Backed out changeset 44270ea2f53c (bug 1732306)
Backed out changeset e063d64d28a6 (bug 1732306)
Backed out changeset 1824083c6fc1 (bug 1732306)
2024-02-08 04:06:38 +02:00
Nathan LaPre 970d32d957 Bug 1732306 - Part 4: Implement generic role mapping, r=Jamie
This revision 'implements' the 'generic' ARIA role mapping by mapping ARIA
'generic' to Gecko 'section.' This isn't a full implementation of 'generic' - it
sidesteps it to avoid dealing with larger 'generic' issues (namely: that there
are multiple roles that are 'generic' in Gecko currently). We'll sort that out
in a later commit.

Differential Revision: https://phabricator.services.mozilla.com/D200133
2024-02-07 19:51:40 +00:00
Nathan LaPre f01fa3c6d9 Bug 1732306 - Part 3: Implement time role mappings, r=Jamie
This revision adds role mappings for the 'time' ARIA role by implementing HTML
markup mapping, adding platform mappings, and adding the role info itself. This
revision also enables the previously-failed wpt tests and fixes other tests.

Differential Revision: https://phabricator.services.mozilla.com/D200132
2024-02-07 19:51:40 +00:00
Nathan LaPre 45b7b34cd0 Bug 1732306 - Part 2: Implement strong role mappings, r=Jamie
This revision implements mapping for the ARIA 1.2 'strong' role by adding a
markup mapping, a role definition, and platform mappings. This revision also
removes the expected failures in the wpt test suite and fixes other tests.

Differential Revision: https://phabricator.services.mozilla.com/D200131
2024-02-07 19:51:39 +00:00
Nathan LaPre 279469706f Bug 1732306 - Part 1: Implement emphasis role mappings, r=Jamie
This revision implements the mapping for the ARIA 1.2 emphasis role, which was
unsupported in Firefox until now. This change addresses a web platform test
failure. To accomplish this, the revision adds the WAI-defined role, adds a role
enum value, adds platform mappings, and adds a markup role mapping. The change
requires a new static atom for the word "emphasis," also added in this revision.
Finally, this change removes the expected wpt failure and updates other tests.

Differential Revision: https://phabricator.services.mozilla.com/D200130
2024-02-07 19:51:39 +00:00
Masayuki Nakano 657bc8f9d5 Bug 1878191 - Fix 2 iterating loops of selection ranges r=smaug,Jamie
These loops may run script.

In  `HyperTextAccessible`, it calls
`RemoveRangeAndUnselectFramesAndNotifyListeners`. So, chrome script which is not
directly related to this module may run in each call.  I think that using
`RemoveAllRanges` is better for here.  Before bug 1735446, this loop tried
to keep first range, but accidentally, I changed this loop delete all ranges.
However, `SetSelectionBoundsAt` will add a range if it's required and there is
no bug reports.  Therefore, I think keep the new behavior is better.

In `nsRange::DeleteFromDocument`, the loop may run mutation events too.
Therefore, it needs to store all ranges first.  Then, the preceding patch
changes the behavior here if a selection range is moved to different root.
Previously, it was deleted, but now, they are not touched.

Depends on D200606

Differential Revision: https://phabricator.services.mozilla.com/D200607
2024-02-07 04:34:38 +00:00
Nathan LaPre 6b8a3f8047 Bug 1829028: Explicitly support term, definition ARIA roles, r=Jamie
This revision aims to add support for the 'term' and 'definition' ARIA roles.
These roles already exist in Gecko, but aren't fully mapped where they should
be. To address the problem, this revision adds a static atom for "definition,"
implements the ARIA map for definition, adds a markup map entry for the dfn
element (which has the DEFINITION role), and puts the term and definition atoms
in the role map. As a consequence of these changes, this revision also removes
the expected web platform test failures and updates other existing tests.

Differential Revision: https://phabricator.services.mozilla.com/D200219
2024-02-06 03:50:29 +00:00
James Teh c2b101c8e7 Bug 1854040: When doing UIA client detection on Windows 11, call GetNamedPipeServerProcessId before querying the handle's name. r=nlapre
Querying a handle's name can hang forever in some cases.
I'm hoping (albeit doubtfully) that GetNamedPipeServerProcessId might not hang where querying the handle's name does, and also that the handle that's hanging isn't the handle we need.
This seems to fix the problem for one user, so maybe my doubts are unfounded.

Differential Revision: https://phabricator.services.mozilla.com/D197035
2024-02-05 21:57:37 +00:00
Sam Johnson cb598c21ab Bug 1668119 - Update macOS menupopup metrics for modern appearance. r=desktop-theme-reviewers,emilio,reusable-components-reviewers,dao
While bug 1861671 improved menupopup styling to closer match modern macOS, there were still several discrepancies between native and non-native menu metrics. The following adjustments were made in this patch to match native styles:
- Don't render the checkmark containers for menus with no checked or checkable items
- Adjusted various spacings to match native metrics
- Apply padding to the accelerator container only if an accelerator is present
- Fixed regression from bug 1861671 resulting in menuitems being misaligned with sub-menus

These changes result in non-native menupopups appearing nearly indistinguishable from native menus.

Differential Revision: https://phabricator.services.mozilla.com/D199787
2024-02-04 10:48:10 +00:00
Emilio Cobos Álvarez 2a90e77ea0 Bug 1878092 - Remove <xul:popup> element. r=Gijs
It's only used from some crashtests, and it hasn't worked in a long,
long time, due to it not having the right styles in xul.css

Differential Revision: https://phabricator.services.mozilla.com/D200361
2024-02-02 19:28:21 +00:00
Nathan LaPre a2b1bf3551 Bug 1858051: Fix ComputedARIARole for <input type="search">, r=Jamie
The markup <input type="search"> will report a ComputedARIARole of "textbox,"
which isn't correct - it should return "searchbox." To address this issue, this
revision implements a change to ComputedARIARole for searchboxes, checking
IsSearchbox() and returning the searchbox atom if so. This revision also enables
the previously expected-failure relevant web platform test, since we now pass it.

Differential Revision: https://phabricator.services.mozilla.com/D200235
2024-02-02 18:23:21 +00:00
Nathan LaPre d9c506aa8d Bug 1821156: Map hgroup element to group role, r=Jamie
Per HTML AAM, HTML hgroup elements should have an implicit role=group instead
of being generics. This revision implements that by mapping hgroup elements to
roles::GROUPING in HTMLMarkupMap. It also removes the expected fail from the
relevant web platform test, which we now pass.

Differential Revision: https://phabricator.services.mozilla.com/D200204
2024-02-02 18:22:16 +00:00
James Teh 673de145ac Bug 1840574: Don't try to get the selection in HyperTextAccessible::GetSelectionDOMRanges if the initial tree hasn't been constructed yet. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D199601
2024-01-30 01:19:23 +00:00
Anna Yeddi 6894f9a115 Bug 1871980 - Add a programmatic role and expanded/collapsed state to the Search expand/collapse image button on the Searchbar. r=search-reviewers,Standard8,Jamie
`searchbar-search-button` includes two `<image>` elements, one of which is aimed to visually communicate that this `overlay` image could expand/collapse the search autosuggest list. This `<hbox>` that has an accessible name but lacks an appropriate interactive role and state, because it functions as a button (not focusable with keyboard because the alternative - `Escape` key - exists and works to collapse the autosuggest list and we do not want to create an additional tab stop for keyboard-only users). This would prevent users of speech-to-text/Voice Control from being able to send a click to it by calling its label and screen reader users and users of other assistive technology would not be able to get to this control via shortcuts like a list of controls, etc.

This issue is similar to the `Go` button on the URL bar resolved in the bug 1864962 and to the `Submit search` button tracked in bug 1871596

To activate the searchbar next to the URL Bar that includes this go button: `about:preferences` > `Search` > `Search Bar` > select `Add search bar in toolbar`.

Depends on D199504

Differential Revision: https://phabricator.services.mozilla.com/D197335
2024-01-29 19:24:07 +00:00
Anna Yeddi d9c5fe6995 Bug 1876315 - Adding a ROLE_BUTTONMENU constant to mochitest/role.js. r=morgan
This would allow browser test like `accessible/tests/browser/tree/browser_searchbar.js` to test accessible roles in the Accessibility tree for buttons with `aria-haspopup` attributes.

Depends on D199394

Differential Revision: https://phabricator.services.mozilla.com/D199504
2024-01-29 19:24:07 +00:00
Tom Marble 3c78905f47 Bug 1868866 - adds ManifestParser TOML linter r=jmaher,linter-reviewers,ahal,webdriver-reviewers,settings-reviewers,search-reviewers,devtools-reviewers,fxview-reviewers,cookie-reviewers,sessionstore-reviewers,places-reviewers,dom-storage-reviewers,translations-reviewers,valentin,whimboo,Standard8,sclements,jesup
Differential Revision: https://phabricator.services.mozilla.com/D199054
2024-01-29 17:30:48 +00:00
Sandor Molnar 51bb77759a Backed out changeset 2be67d91cf16 (bug 1868866) for causing Mn failures at toolkit/xre/test/marionette/test_exitcode.py CLOSED TREE 2024-01-27 00:15:22 +02:00
Tom Marble 2434015dc5 Bug 1868866 - adds ManifestParser TOML linter r=jmaher,linter-reviewers,ahal,webdriver-reviewers,settings-reviewers,search-reviewers,devtools-reviewers,fxview-reviewers,cookie-reviewers,sessionstore-reviewers,places-reviewers,dom-storage-reviewers,translations-reviewers,valentin,whimboo,Standard8,sclements,jesup
Differential Revision: https://phabricator.services.mozilla.com/D199054
2024-01-26 20:06:56 +00:00
Stanca Serban 5a48aa44db Backed out 6 changesets (bug 1875528) for causing leakcheck failures. CLOSED TREE
Backed out changeset dcbbb7316940 (bug 1875528)
Backed out changeset a5c0564f9761 (bug 1875528)
Backed out changeset f3bc6e972f79 (bug 1875528)
Backed out changeset 535378dd79b0 (bug 1875528)
Backed out changeset 3cef14ed0f25 (bug 1875528)
Backed out changeset f0941fdbbabb (bug 1875528)
2024-01-25 01:26:46 +02:00
Nika Layzell 3c0d6b5c0b Bug 1875528 - Part 1: Make IProtocol hold a strong reference to manager, r=ipc-reviewers,mccr8
This makes accessing `Manager()` on an IPDL protocol safer, and replaces the
previous ActorLifecycleProxy reference, which would only keep the manager alive
until IPDL drops its reference.

Unfortunately this introduces some leaks due to reference cycles, which will be
fixed in follow-up parts.

Differential Revision: https://phabricator.services.mozilla.com/D198624
2024-01-24 20:54:40 +00:00
Eitan Isaacson ba3c5e3b7b Bug 1849398 - Gecko initiated a11y focus should not scroll. r=Jamie
If we send an Android ACCESSIBILITY_FOCUSED event because of a content
update (ie. scrolling to anchor or DOM selection changes) we should not
scroll the accessible into view. We should assume the content is being
brought into view by itself.

Testing: We already have tests to show that we scroll an accessible into
view when navigating content, testing for the inverse (that the scroll
is done by other means and NOT a11y) is very hard.

Differential Revision: https://phabricator.services.mozilla.com/D199433
2024-01-24 04:49:03 +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
Morgan Rae Reschenberg f85f46278f Bug 1863436: Add HCM Media Query documentation r=Jamie,ayeddi,jules,mstriemer,desktop-theme-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D192901
2024-01-23 21:00:10 +00:00
Tom Schuster 97be7de9ad Bug 1875466 - Remove browser.opaqueResponseBlocking.syntheticBrowsingContext pref. r=emilio
Depends on D199115

Differential Revision: https://phabricator.services.mozilla.com/D199116
2024-01-22 14:26:11 +00:00
Eitan Isaacson 970977ffc7 Bug 1871385 - Enabled popover in caching tests. r=ayeddi
This pref needs to be set when the browser starts. I think setting
it in browser.toml does the trick.

Differential Revision: https://phabricator.services.mozilla.com/D198715
2024-01-16 21:55:25 +00:00
Frédéric Wang 01d8813ff7 Bug 1765615 - Improve browser_treeupdate_csscontentvisibility.js. r=Jamie
Extend a bit the test for dynamic changes to content-visibility, adding
the following checks:

* If there are text descendants in the content-visibility subtree,
  make sure they are created when switching to auto ; and removed
  when switching back to hidden.
* If there is a content-visibility: hidden or a visibility: hidden
  descendant, make sure pruning still applies when switching to
  auto.
* If there is a shadow host in the  content-visibility subtree,
  make sure that shadow subtree is properly updated when
  content-visibility changes.

Differential Revision: https://phabricator.services.mozilla.com/D196964
2024-01-10 09:26:17 +00:00
Daniel Holbert eec12e877e Bug 1860705: Use pushPrefEnv instead of setBoolPref in mochitest test_statechange.html. r=eeejay
setBoolPref has a persistent effect for the rest of the test run (potentially
affecting the behavior of other prefs), so we don't want to use
that. This test is currently failing when run in test-verify mode as a result
of this.  With pushPrefEnv, the test will properly undo its pref-modification
when it completes.

Note: I'm moving the pref-toggle statement inside of a function so that I can
use the ergonomic `await` syntax. This is still essentially right at the start
of the test, since `doTests` is the main function here.

Differential Revision: https://phabricator.services.mozilla.com/D197830
2024-01-09 20:22:57 +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
Masayuki Nakano cd53d5600e Bug 1816581 - part 6: Move the static methods used for moving caret or considering caret geometry into new utility class r=emilio
The methods are in `nsCaret`, `nsFrameSelection` and `dom::Selection`.  That
makes harder to read, and they are called each other, so, they are reused for
different purpose.  Therefore, it must be better to move them into a new class.
Then, the name differences may become more unclear.  If you think so, feel free
to request renaming some methods of them.

Differential Revision: https://phabricator.services.mozilla.com/D197288
2023-12-27 04:42:12 +00:00
Masayuki Nakano fe9fef936b Bug 1816581 - part 1: Make `CaretAssociationHint` an enum class r=emilio
For forward-decl-able.

Differential Revision: https://phabricator.services.mozilla.com/D197283
2023-12-27 04:42:09 +00:00
James Teh a09e359b77 Bug 1871385: Set pref to enable popover in related a11y test. r=ayeddi
Differential Revision: https://phabricator.services.mozilla.com/D197126
2023-12-22 21:19:59 +00:00
Emilio Cobos Álvarez 06608371e0 Bug 1871023 - Trivially fix some orange.
MANUAL PUSH: Trivial orange fix CLOSED TREE
2023-12-21 11:16:20 +01:00
James Teh 06eb0ca294 Bug 1834718: Don't process a duplicate DocAccessible::ContentRemoved call for a DOM node we've already processed. r=morgan
ContentRemoved recursively walks both AllChildrenIterator and direct DOM children.
In addition, we might get duplicate notifications from DOM and layout, plus PruneOrInsertSubtree might do a recursive walk and it too calls ContentRemoved.
To avoid this duplicate processing, keep a set of removed DOM nodes on the DocAccessible which we clear after mutation events are processed.

Differential Revision: https://phabricator.services.mozilla.com/D196707
2023-12-20 21:59:41 +00:00
Emilio Cobos Álvarez 07c2523b91 Bug 1870512 - Remove accessibility hack that should not longer be needed. r=Jamie
There's no windows with popup=true anymore as of the previous patch.

Depends on D196665

Differential Revision: https://phabricator.services.mozilla.com/D196666
2023-12-20 21:51:06 +00:00
Ziran Sun 584d474cc3 Bug 1867811 - Expose EXPANDED state for element with popovertarget. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D196541
2023-12-19 17:30:56 +00:00
Norisz Fay 90733dd7b4 Backed out changeset 846e436ca1c2 (bug 1870512) for causing automation.py related Windows failures CLOSED TREE 2023-12-18 21:53:13 +02:00
Emilio Cobos Álvarez 1fb0635d77 Bug 1870512 - Remove accessibility hack that should not longer be needed. r=Jamie
There's no windows with popup=true anymore as of the previous patch.

Depends on D196665

Differential Revision: https://phabricator.services.mozilla.com/D196666
2023-12-18 17:56:42 +00:00
Jens Stutte 5ad7616e60 Bug 1839051 - Make AccIdxComparator resilient against calls with r=Jamie=b.
std::sort used by nsTArray::Sort expects the comparator to be tolerant
for being called to compare the very same element with itself.

Differential Revision: https://phabricator.services.mozilla.com/D195482
2023-12-11 06:53:28 +00:00