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

10684 Коммитов

Автор SHA1 Сообщение Дата
Eitan Isaacson 4dce76304c Bug 1839515 - Remove pivot text navigation API. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D181576
2023-06-21 21:15:47 +00:00
Norisz Fay f8505d5db9 Backed out changeset 8178c74a4c65 (bug 1839515) for causing mochitest failures on browser_events_vcchange.js 2023-06-21 22:21:29 +03:00
Eitan Isaacson da7273bd10 Bug 1839515 - Remove pivot text navigation API. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D181576
2023-06-21 17:55:06 +00:00
Eitan Isaacson 446672d058 Bug 1839516 - Remove FORWARD_ACTION_TO_ACCESSIBLE in Android. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D181575
2023-06-21 16:22:51 +00:00
Vincent Hilla 99810beb2a Bug 1708370 - adjust UA stylesheet to match spec for form rendering. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D180812
2023-06-21 07:35:34 +00:00
James Teh 2f752feae8 Bug 1839111: Don't fire an alert event if we're processing insertions due to layout frame reconstruction but we don't actually insert anything. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D181354
2023-06-21 06:52:29 +00:00
James Teh 987c8e49d5 Bug 1838782: Add null checks in HyperTextAccessibleBase::OffsetAtPoint. r=morgan
1. nsAccUtils::DocumentFor might return null if the Accessible is being moved and a client queried it during the move.
2. ChildAtPoint might return null if the point can't be located at all.

Differential Revision: https://phabricator.services.mozilla.com/D181213
2023-06-20 22:02:40 +00:00
Eitan Isaacson b3cea24dfd Bug 1834874 - P2: Remove DocAccessiblePlatformExt. r=Jamie,ipc-reviewers,mccr8
Since we removed the last dependency on this subprotocol, we can now
remove it.

Differential Revision: https://phabricator.services.mozilla.com/D181321
2023-06-20 18:15:43 +00:00
Eitan Isaacson 85a5ad4790 Bug 1834874 - P1: Make text navigation work in UI thread with cached TextLeafPoint API. r=Jamie,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D181320
2023-06-20 18:15:42 +00:00
Nathan LaPre 221859a0e6 Bug 1837315: Avoid queueing a hide event on an accessible that's already being moved, r=Jamie
If we move an accessible via an aria-owns relocation on a grandparent, then move
it again via an aria-owns relocation on a parent, we can end up with multiple
hide events in the queue: one for the shallowest hide (of the grandparent), and
one for the hide of the grandchild accessible. We can't always coalesce (drop)
the hide event of the grandchild since the first move severs the relationship
between its parent and its grandparent. To address this, this revision stops us
from queueing a hide event on an accessible that's already being moved. This
revision also adds a test to verify we're getting the proper events.

Differential Revision: https://phabricator.services.mozilla.com/D180888
2023-06-15 23:12:00 +00:00
James Teh 962a479c5c Bug 1728676: Correctly expose ARIA table cells in SVG. r=nlapre
Previously, the code to create ARIAGridCellAccessible only ran for HTML elements.
This meant that ARIA cells weren't exposed correctly in SVG.
This code has now been moved outside of the HTML check so that it works for SVG as well.

Differential Revision: https://phabricator.services.mozilla.com/D181077
2023-06-15 22:48:17 +00:00
James Teh 9231425225 Bug 1838540: Don't recurse in ApplyARIAState on a grid cell if the cell is also a table. r=nlapre
This can only happen due to authoring error; <table role=gridcell outside of an ARIA grid isn't valid.
Nevertheless, we would previously recurse infinitely in this case in ApplyARIAState.
Prevent this by not recursing if IsTable() is true.

Differential Revision: https://phabricator.services.mozilla.com/D181026
2023-06-15 22:48:17 +00:00
James Teh 12e8d401f1 Bug 1838151: Remove unused a11y::filters::GetRow/GetCell. r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D180784
2023-06-14 03:31:45 +00:00
James Teh c49bf94d77 Bug 1838138: Remove InSendMessageEx hack. r=nlapre
This was only necessary when we had cross-process COM proxies for accessibility.

Differential Revision: https://phabricator.services.mozilla.com/D180776
2023-06-14 03:30:40 +00:00
James Teh 1f73a200af Bug 1837430: Fix LocalAccessible::EmbeddedChildAt such that it returns a remote document if appropriate. r=morgan
In bug 1834006, I unified the ATK child retrieval code so that it uses Accessible::EmbeddedChildAt, rather than having different code paths for local, remote, local OuterDocAccessibles embedding remote documents, etc.
Unfortunately, LocalAccessible::EmbeddedChildAt previously didn't handle remote document children, even though LocalAccessible::EmbeddedChildCount returned 1.
This meant that we weren't returning a child at all in this case on Linux, resulting in a broken tree.
To fix this, make LocalAccessible::EmbeddedChildAt fall back to ChildAt instead of LocalChildAt.

Differential Revision: https://phabricator.services.mozilla.com/D180606
2023-06-14 01:44:50 +00:00
Stanca Serban 3ab64511ea Backed out changeset 25b7d7779f41 (bug 1838138) for causing bp-nu bustages in Compatibility.cpp. 2023-06-14 04:52:07 +03:00
James Teh 01d480b80d Bug 1837332: Remove unused HyperTextAccessible::EnclosingRange/VisibleRanges/RangeByChild/RangeAtPoint, TextRange::EmbeddedChildren/Text and xpcAccessibleTextRange::ScrollIntoView. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D180301
2023-06-14 00:43:11 +00:00
James Teh c1a2fd8cdb Bug 1838138: Remove InSendMessageEx hack. r=nlapre
This was only necessary when we had cross-process COM proxies for accessibility.

Differential Revision: https://phabricator.services.mozilla.com/D180776
2023-06-14 00:38:57 +00:00
Eitan Isaacson 0b3727802d Bug 1819160 - Map Android ids to doc/accessible id pairs. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D179737
2023-06-13 18:33:35 +00:00
James Teh a984d0f58f Bug 1780667: Don't fire a11y focus on the DOM element when its aria-activedescendant is cleared/invalidated if the element doesn't have DOM focus. r=eeejay
aria-activedescendant should only take effect when the element has DOM focus.
Previously, clearing aria-activedescendant or setting it to an invalid id on an element without DOM focus would incorrectly fire a11y focus on that element.
Also, this caused an assertion to be fired due to a defunct active item if this happened alongside a text selection change.

Differential Revision: https://phabricator.services.mozilla.com/D180630
2023-06-13 00:30:49 +00:00
James Teh 03ab4e1314 Bug 1837825: Always cache the src of images, even those with alt text. r=morgan
Unfortunately, authors providing useless alt text is becoming increasingly common, so in the real world, we can't assume that having alt text makes an image accessible.

Differential Revision: https://phabricator.services.mozilla.com/D180608
2023-06-13 00:20:51 +00:00
Morgan Rae Reschenberg 08e73e0c07 Bug 1837030: Treat fuzzily-matched text leaves as valid in OffsetAtPoint r=Jamie,nlapre
Differential Revision: https://phabricator.services.mozilla.com/D180515
2023-06-12 21:01:04 +00:00
Nathan LaPre f20a8d8057 Bug 1723195: Allow intervening generic accessibles between table rows and cells, r=Jamie
This commit ensures that we get the proper non-generic parent when creating a
grid cell accessible. Before this patch, we wouldn't see this grid cell as a
grid cell accessible. This patch also adds a test for this case, along with a
test for a similar case that inserts a generic accessible between the table
itself and a rowgroup.

Differential Revision: https://phabricator.services.mozilla.com/D180393
2023-06-09 23:43:25 +00:00
Anna Yeddi c7d66d7729 Bug 1834931 - Map HTML <code> to roles::CODE. r=Jamie
Mapping HTML `<code>` and updating its corresponding tests and meta files.

Differential Revision: https://phabricator.services.mozilla.com/D179602
2023-06-08 13:38:15 +00:00
James Teh 7ae0834dd8 Bug 1832228 part 3: Rename TableAccessibleBase to TableAccessible and TableCellAccessibleBase to TableCellAccessible. r=nlapre
Now that the local-only TableAccessible and TableCellAccessible have been removed, we no longer need this Base suffix for the unified classes.
Aside from renaming the header files, most of the rest of this was done with the following script:

```
function replace {
  sed -i 's/'$1'/'$2'/g' `git grep -l $1`
}
replace TableAccessibleBase TableAccessible
replace TableCellAccessibleBase TableCellAccessible
replace AsTableBase AsTable
replace AsTableCellBase AsTableCell
```

Differential Revision: https://phabricator.services.mozilla.com/D179803
2023-06-08 09:50:28 +00:00
James Teh 23a28d03bb Bug 1832228 part 2: Remove TableAccessible and TableCellAccessible. r=nlapre
These classes are no longer used.
The remaining XUL subclasses now derive from Table*AccessibleBase.
XULTreeGridAccessible depended on some methods in TableAccessible which are no longer used by anything else, so these have been moved into XULTreeGridAccessible itself.

Differential Revision: https://phabricator.services.mozilla.com/D179802
2023-06-08 09:50:28 +00:00
James Teh 220f6dfece Bug 1832228 part 1: Remove ARIAGridAccessible, ARIARowAccessible and most of ARIAGridCellAccessible. r=nlapre
We now use CachedTableAccessible for ARIA tables and grids, so most of the code in the ARIA table classes was unused.

1. Remove ARIAGridAccessible and ARIARowAccessible completely.
2. ARIAGridCellAccessible no longer derives from TableCellAccessible.
3. Remove most of ARIAGridCellAccessible.
4. We still use ARIAGridCellAccessible to differentiate between valid and invalid cells. Valid cells create an ARIAGridCellAccessible and ARIAGridCellAccessible::IsTableCell() returns true due to mGenericTypes. Invalid cells don't get an ARIAGridCellAccessible, so IsTableCell() returns false on those.
5. We also keep the code in ARIAGridCellAccessible to expose some states and attributes.
6. The code for creating ARIAGridCellAccessible in CreateAccessible has been refactored, both for simplification and to fix bugs. display: contents tables now properly get the table and table cell interfaces; i.e. IsTable() and IsTableCell() return true when appropriate. Walking non-generic ancestors should fix ARIA tables with intervening generics, though this will be dealt with fully in a separate bug.

Differential Revision: https://phabricator.services.mozilla.com/D179801
2023-06-08 09:50:28 +00:00
James Teh 9ecdad92e8 Bug 1832261: Remove most of HTMLTable*Accessible. r=nlapre
We now use CachedTableAccessible for HTML tables, so much of the code in the HTMLTable*Accessible classes was unused.
However, we still depend on these classes for some data needed to build the cached table.

1. HTMLTableAccessible and HTMLTableCellAccessible no longer derive from TableAccessible and TableCellAccessible, respectively. Instead, callers which need specific access to HTML table data use the HTMLTable*Accessible class directly.
2. All table specific methods have been removed except those that provide data required to build a CachedTableAccessible. The remaining methods are those for querying the row/column span (which depends on layout) and getting the caption (which depends on DOM).
3. HTMLTable*Accessible are now used for all <table>, <td>, <th> and <tr> elements and MathML equivalents. ARIA*Accessible are never used for these elements. This improves consistency, simplifies the code and means that behavior specific to these HTML elements is handled in these classes, rather than in the ARIA classes as well.
4. The table and row roles are now specified in HTMLMarkupMap and MathMLMarkupMap, rather than overriding NativeRole.  Cell roles are still handled in a NativeRole override; see the code comments for details.
5. IsProbablyLayoutTable has been moved from TableAccessible to HTMLTableAccessible, as it is only relevant for HTML tables, not for ARIA tables.
6. HTMLTableHeaderCellAccessible::NativeRole has been rewritten such that it no longer depends on querying table coordinates, as that would now require building a CachedTableAccessible, which would be very wasteful here. This replaces TableCellAccessible::HeaderCellRole, which has been removed.

Differential Revision: https://phabricator.services.mozilla.com/D179799
2023-06-08 09:50:28 +00:00
Anna Yeddi 3ae23f78be Bug 1796178 - Revise mapping for <s> element to role=deletion. r=Jamie
Updated HTMLMarkupMap to expose `<s>` element with an implicit `roles::CONTENT_DELETION`, updated `accessible/tests/mochitest/elm/test_HTMLSpec.html` Mochitest and expected results for `testing/web-platform/tests/html-aam/roles.html` wpt test

Differential Revision: https://phabricator.services.mozilla.com/D179842
2023-06-08 00:28:38 +00:00
Nathan LaPre bb0eac529c Bug 1789235: Fire a scrolling start event for anchor jump if focus in doc, r=Jamie
This revision modifies NotifyOfAnchorJump in order to ensure that we fire a
scrolling start event for AT clients. Without this, clients might miss anchor
jump updates, since anchor jumps can arrive after getting focus. This revision
also adds a test to verify that the scrolling start event is now being sent.

Differential Revision: https://phabricator.services.mozilla.com/D177419
2023-06-08 00:06:39 +00:00
James Teh a89668b961 Bug 1837105: Add methods for determining generic Accessibles and getting the nearest non-generic ancestor. r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D179800
2023-06-07 22:34:49 +00:00
Eitan Isaacson 893830a805 Bug 1835162 - Use new async clipboard IPC methods in Android. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D179159
2023-06-07 06:49:56 +00:00
James Teh bd9bd8733b Bug 1835967: Remove TableAccessibleBase::Select/UnselectCol/Row. r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D179513
2023-06-07 01:40:25 +00:00
Hunseop Jeong bc6e2d89d2 Bug 1826904 - Add the AXSubrole for role="meter". r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D179884
2023-06-06 20:42:24 +00:00
Nathan LaPre 9dc4cae6ba Bug 1455416: Relocate aria-owned accessibles on (aria) parent removal, r=Jamie
This revision modifies UncacheChildrenInSubtree such that removed but relocated
accessibles that are aria-owned are actually relocated to their proper parent
after the removal of the formerly-aria-owning parent. It also contains some
fixes for issues that allowing this relocation unleashes. In particular:
- Logic in PutChildrenBack is reworked in order to better handle different
  reparenting situations, such as unacceptable parents or original containers
  (or ancestors thereof) that are no longer in the document. These changes help
  us avoid failure modes related to events on defunct accessibles, or bad
  coalescence due to partially-shut-down trees.
- ShutdownOrPrepareForMove has been updated to handle moving children. We now
  recurse through children and move them rather than just shutting them down.
This revision adds tests which verify that the functionality works as intended.

Differential Revision: https://phabricator.services.mozilla.com/D176204
2023-06-06 18:43:40 +00:00
Norisz Fay 63fa83129d Backed out changeset 1d562ee8729b (bug 1796178) for causing mochitest failures on test_general.html CLOSED TREE 2023-06-06 22:22:18 +03:00
Norisz Fay 357f177c83 Backed out changeset dbe49d0e5b60 (bug 1834931) for causing mochitest failures on browser_caching_text_bounds.js 2023-06-06 22:21:09 +03:00
Anna Yeddi af5fecdbd1 Bug 1829269 - Add support for ARIA 1.3 role="image". r=Jamie
Adding ARIAMap for nsGkAtoms::image and mapping to it GRAPHIC to nsGkAtoms::image instead of img in RoleMap. This allows both tests listed in the expectations metadata file in `testing/web-platform/meta/wai-aria/role/synonym-roles.html.ini` to be passing, thus removing this file.

Differential Revision: https://phabricator.services.mozilla.com/D179720
2023-06-06 15:23:32 +00:00
Anna Yeddi efb3216a37 Bug 1796178 - Revise mapping for <s> element to role=deletion. r=Jamie
Updated HTMLMarkupMap to expose `<s>` element with an implicit `roles::CONTENT_DELETION`, updated `accessible/tests/mochitest/elm/test_HTMLSpec.html` Mochitest and expected results for `testing/web-platform/tests/html-aam/roles.html` wpt test

Differential Revision: https://phabricator.services.mozilla.com/D179842
2023-06-06 15:17:26 +00:00
Anna Yeddi 578616014d Bug 1834931 - Map HTML <code> to roles::CODE. r=Jamie
Mapping HTML `<code>` and updating its corresponding test and meta files.

Differential Revision: https://phabricator.services.mozilla.com/D179602
2023-06-06 15:15:20 +00:00
Morgan Rae Reschenberg c3544381e4 Bug 1835194: Add Use System Colors telemtry probe r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D179180
2023-05-31 22:18:03 +00:00
Gregory Pappas 941d7766f8 Bug 1822864 - Remove browser.download.improvements_to_download_panel pref r=Gijs,settings-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D179300
2023-05-31 10:29:37 +00:00
James Teh 6f49fe6b0c Bug 1828295 part 3: Add tests for GetCaretRect. r=morgan
This required exposing GetCaretRect via XPCOM.

Differential Revision: https://phabricator.services.mozilla.com/D179346
2023-05-31 10:04:18 +00:00
James Teh b17144e206 Bug 1828295 part 2: When setting the fake a11y Windows caret, convert the screen coordinates to client coordinates. r=nlapre
Previously, we were making the screen coordinates relative to the window rect.
However, the window rect includes the non-client area of the window, which includes the title bar.
SetCaretPos expects client coordinates.
In Firefox, this normally doesn't matter because the title bar is disabled, so there is no non-client area.
However, when the title bar is disabled, the coordinates were previously incorrect.

Differential Revision: https://phabricator.services.mozilla.com/D176620
2023-05-31 10:04:18 +00:00
James Teh f34c3edf90 Bug 1828295 part 1: Fix HyperTextAccessible::GetCaretRect when the title bar is enabled. r=morgan
I don't quite know which part of this was breaking, but the coordinates were quite wrong in the parent process.
They were wrong enough that when we adjusted for the character height, we ended up with a negative height in the resulting rect.
This code is now more similar to how we do this in LocalAccessible::BoundsInAppUnits.
This should also take CSS transforms into account in most cases where we weren't previously, though perhaps not for some iframe transforms.

Differential Revision: https://phabricator.services.mozilla.com/D176619
2023-05-31 10:04:18 +00:00
Natalia Csoregi 6f5c0c586c Backed out 3 changesets (bug 1828295) for causing failures on browser_caret_rect.js. CLOSED TREE
Backed out changeset 52b9bf7e6344 (bug 1828295)
Backed out changeset 6e6ee5fe337f (bug 1828295)
Backed out changeset 4e8ff9c439ef (bug 1828295)
2023-05-31 08:44:34 +03:00
James Teh c342e57201 Bug 1828295 part 3: Add tests for GetCaretRect. r=morgan
This required exposing GetCaretRect via XPCOM.

Differential Revision: https://phabricator.services.mozilla.com/D179346
2023-05-31 03:43:29 +00:00
James Teh ef2bb865b5 Bug 1828295 part 2: When setting the fake a11y Windows caret, convert the screen coordinates to client coordinates. r=nlapre
Previously, we were making the screen coordinates relative to the window rect.
However, the window rect includes the non-client area of the window, which includes the title bar.
SetCaretPos expects client coordinates.
In Firefox, this normally doesn't matter because the title bar is disabled, so there is no non-client area.
However, when the title bar is disabled, the coordinates were previously incorrect.

Differential Revision: https://phabricator.services.mozilla.com/D176620
2023-05-31 03:43:29 +00:00
James Teh 3fe3bb9a1f Bug 1828295 part 1: Fix HyperTextAccessible::GetCaretRect when the title bar is enabled. r=morgan
I don't quite know which part of this was breaking, but the coordinates were quite wrong in the parent process.
They were wrong enough that when we adjusted for the character height, we ended up with a negative height in the resulting rect.
This code is now more similar to how we do this in LocalAccessible::BoundsInAppUnits.
This should also take CSS transforms into account in most cases where we weren't previously, though perhaps not for some iframe transforms.

Differential Revision: https://phabricator.services.mozilla.com/D176619
2023-05-31 03:43:29 +00:00
James Teh 09d623679d Bug 1818404: Use HTMLLinkAccessible for SVG <a> elements. r=nlapre
This ensures that these are HyperTextAccessibles if they contain text, which prevents assertions and exposes formatting information.
It also gives these the correct role.

Differential Revision: https://phabricator.services.mozilla.com/D179409
2023-05-31 02:33:57 +00:00