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

3565 Коммитов

Автор SHA1 Сообщение Дата
James Teh 9940ee3418 Bug 1880063: Explicitly enable popover for role tests so that browser_minimumRole.js runs correctly on beta where popover is still disabled. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D201802
2024-02-15 20:42:14 +00:00
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 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
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 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
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
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
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
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
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
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
James Teh 583b9dc159 Bug 1836823: If we create an Accessible for SVG <foreignObject> due to an ARIA role, etc., use a HyperTextAccessible. r=morgan
We don't normally create an Accessible for <foreignObject>.
However, if there's an ARIA role or similar, we forceably create one.
Previously, if we ever did this for an SVG element, we would use an AccessibleWrap, which doesn't support HyperText.
This is normally correct because most SVG elements can't contain text.
However, a <foreignObject> can most definitely contain text, so we must use HyperTextAccessible.
This fixes assertions and text attributes.

Differential Revision: https://phabricator.services.mozilla.com/D195387
2023-12-11 00:39:25 +00:00
Joel Maher c993099c60 Bug 1865385 - remove win7/win-aarch64 annotations from reftest manifests. r=gbrown
Differential Revision: https://phabricator.services.mozilla.com/D193995
2023-12-05 21:49:04 +00:00
James Teh f36ae8432b Bug 1862802 part 5: Remove virtual cursor change event. r=eeejay
Depends on D192645

Differential Revision: https://phabricator.services.mozilla.com/D192646
2023-11-29 03:53:20 +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 44caba5c0c Bug 1862802 part 5: Remove virtual cursor change event. r=eeejay
Depends on D192645

Differential Revision: https://phabricator.services.mozilla.com/D192646
2023-11-28 22:03:21 +00:00
James Teh 3396179cba Bug 1862437: Return the correct data for ATK get_row_column_span. r=eeejay
Previously, this incorrectly returned the row in the column field, the column in the row field, and the column span for both the row and column spans.

Differential Revision: https://phabricator.services.mozilla.com/D192912
2023-11-21 23:34:15 +00:00
James Teh a8d36840cb Bug 1862534: Groundwork for ATK accessibility API tests. r=eeejay,jmaher
This adds setup code and utility functions for ATK to the Python environment.
I also needed to prevent front-end accessibility checks (AccessibilityUtils) from force disabling accessibility for a11y engine tests.
Although the tests re-enabled it anyway, this seems to break AT-SPI's interaction with our ApplicationAccessible.
Disabling it really doesn't make sense in this case anyway.
This patch includes a simple role test to show all of this working.

Differential Revision: https://phabricator.services.mozilla.com/D192911
2023-11-21 02:11:49 +00:00
James Teh 297b3d04a4 Bug 1864511: When hit testing a RemoteAccessible image, image map or inline element without children, just use the rect instead of walking children. r=morgan
An image or image map can't contain text, so it doesn't make sense to walk the lines of any children.
Previously, for normal images (not image maps), we would find no children and thus return false because there were no children containing the point, thus breaking hit testing for images.
For image maps, hit testing would fail for any points that weren't covered by areas.
Now, we don't walk children in these cases, instead just using the element's rect.
We apply this same rule for other inline elements without children, since there are no children to walk in that case and we should use the rect there rather than always returning false.
I don't know if this last case is something that ever happens in practice, but I figured it was best to handle it just in case.

Differential Revision: https://phabricator.services.mozilla.com/D193509
2023-11-17 06:37:27 +00:00
Morgan Rae Reschenberg 5e8494173a Bug 1858556: Add telemetry for Always Underline Links r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D190861
2023-11-09 18:31:07 +00:00
James Teh 74e2c544fe Bug 1863466: Support details and error message relations for RemoteAccessible. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D192916
2023-11-08 00:00:40 +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
James Teh 9bf182f73f Bug 1861902: Enforce some table restrictions to avoid crashes and improve consistency. r=eeejay
1. Never treat a cell in a nested CachedTableAccessible as a cell in the outer table. This could previously result in trying to use cache data from one CachedTableAccessible when querying another, which could cause crashes.
2. Don't create an HTMLTableRowAccessible when the <tr> has a valid ARIA role other than "row". This could previously result in a situation where <tr role="grid"> was treated as a row by its parent table, but the <tr> was also treated as a separate table.

Differential Revision: https://phabricator.services.mozilla.com/D192175
2023-11-06 04:17:45 +00:00
James Teh 0da92731bb Bug 1849590: When hit testing using the cache, only match an inline Accessible if one of its lines includes the requested point. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D192431
2023-11-03 21:32:10 +00:00
James Teh c6046d1016 Bug 1775683: Request a longer timeout for accessible/tests/browser/e10s/browser_caching_name.js. r=eeejay
These timeouts are most likely due to slowness from TSAN overhead.

Differential Revision: https://phabricator.services.mozilla.com/D192305
2023-11-01 00:40:00 +00:00
Mike Hommey 51cedc9e0f Bug 1859997 - Switch manifestparser to toml instead of tomlkit. r=jmaher,ahal,mach-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D191394
2023-10-26 07:30:55 +00:00
James Teh 5d6cbfc643 Bug 1848909: Add a11y support for XUL toolbarbuttons labelled by a text leaf. r=eeejay
Normally, XUL toolbarbutton elements are labelled using the label attribute or a child label element.
However, there are some instances such as in the Synced Tabs menu where a toolbarbutton contains only a text leaf.
Previously, these buttons exposed no label to accessibility APIs.
To fix this, we now allow a text leaf child in the accessibility tree.

We already supported this for XUL button elements.
Also, there was a bunch of existing common code in IsAcceptableChild for XULToolbarbuttonAccessible and XULButtonAccessible and the former subclasses the latter.
Therefore, XULToolbarbuttonAccessible::IsAcceptableChild has been refactored to call the base class method, adding an additional check specific to toolbarbuttons.

Differential Revision: https://phabricator.services.mozilla.com/D191713
2023-10-25 23:31:19 +00:00
Mark Banner 31a45737c0 Bug 1858673 - Remove now unnecessary disabling of ESLint no-unsanitized/* rules from test files. r=freddyb,media-playback-reviewers,credential-management-reviewers,devtools-reviewers,sessionstore-reviewers,places-reviewers,aosmond,sgalich,dao,padenot
Differential Revision: https://phabricator.services.mozilla.com/D190985
2023-10-24 08:48:41 +00:00
James Teh 53b2e98767 Bug 1661923: Expose file input as a button in the a11y tree rather than a group. r=eeejay
A file input contains two native anonymous children: the Browse button and the file name label.
Previously, we exposed the file input as a group in the a11y tree and its anonymous children as children of that group.
While this is semantically correct, it causes several problems for screen readers.
First, if the author provides a label or description, that gets exposed on the group.
Some screen readers ignore either one or the other depending on the screen reader, what the author specified and how the user navigated there.
Second, the file name label isn't focusable and wasn't associated to the group in any way aside from being a child.
This meant that a screen reader user might not perceive it in some cases.

Since most users understand a file input as a single control anyway, we now just expose the input as a simple button containing two text leaves.
However, unlike most buttons, we need to append the text to the name even if the author specifies a name.
As a bonus, this simplifies some code, since we no longer need to redirect focus or events.

An additional problem was that the file input previously returned false for LocalAccessible::IsWidget, which meant that a wrapping HTML label wasn't associated correctly.
This has been fixed as well, although this fix could have applied just as easily to the previous group implementation.

Differential Revision: https://phabricator.services.mozilla.com/D191264
2023-10-23 23:38:13 +00:00
Marc Seibert 04d7ba785a Bug 1853418 - Prepare remaining tests.r=dao
Differential Revision: https://phabricator.services.mozilla.com/D190557
2023-10-18 10:15:34 +00:00
James Teh 92e74db106 Bug 1843832: Never return the text leaf child of a link when calling IAccessible::accHitTest on an ancestor of the link. r=nlapre
This is necessary to work around a bug in the Windows UI Automation -> IAccessible2 proxy.
See the code comments for details.

Differential Revision: https://phabricator.services.mozilla.com/D187529
2023-10-05 04:12:28 +00:00
James Teh 07a83e875e Bug 1852190 part 4: Add Windows UIA interfaces, constants and utility functions to the Python environment. r=eeejay
This also adds a simple control type test which shows all of this working.

Differential Revision: https://phabricator.services.mozilla.com/D187756
2023-10-04 23:58:46 +00:00