Commit Graph
136 Commits
Author SHA1 Message Date
Emilio Cobos Álvarez 1ddad57128 Bug 2034055 - Clean up NodeList / HTMLCollection set-up. r=smaug
Make them concrete classes rather than interfaces, and make the
inheritance chain simpler.

Differential Revision: https://phabricator.services.mozilla.com/D296484
2026-04-28 07:38:27 +00:00
Silaghi ce61f876cc Revert "Bug 2034055 - Clean up NodeList / HTMLCollection set-up. r=smaug" for causing wpt failures at BaseContentList
This reverts commit cde3e5607b.
2026-04-28 03:43:46 +00:00
Emilio Cobos Álvarez cde3e5607b Bug 2034055 - Clean up NodeList / HTMLCollection set-up. r=smaug
Make them concrete classes rather than interfaces, and make the
inheritance chain simpler.

Differential Revision: https://phabricator.services.mozilla.com/D296484
2026-04-28 00:24:11 +00:00
Sylvestre Ledru eafe8b152d Bug 2023419 - Remove Emacs/Vim modelines from accessible/ r=emilio
replaced by .editorconfig
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D287834
2026-03-18 10:29:47 +00:00
Serban Stanca 5a709d4a9a Revert "Bug 2023419 - Remove Emacs/Vim modelines from accessible/ r=emilio" for causing mochitests failures in browser_action.js.
This reverts commit 2fa4815c8d.
2026-03-17 15:34:26 +00:00
Sylvestre Ledru 2fa4815c8d Bug 2023419 - Remove Emacs/Vim modelines from accessible/ r=emilio
replaced by .editorconfig
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D287834
2026-03-17 09:21:51 +00:00
Joe Cardoso 37c1b1d2b9 Bug 1730474 - Ensure native HTML table cells are not selectable by default. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D272807
2025-12-01 16:10:31 +00:00
Eitan Isaacson fc164e80c2 Bug 1998255 - P3: Return eNameFromRelations when name was exclusively calculated from relations. r=morgan
In the case of a file input, never return eNameFromRelations in order to
force a cache of the name.

Depends on D272726

Differential Revision: https://phabricator.services.mozilla.com/D272727
2025-11-21 19:10:18 +00:00
Eitan Isaacson 3dab20d177 Bug 1998242 - P2: Don't rely on NativeName override to suppress subtree name calc. r=morgan
Suppressing name tree calculation in local subclasses is going to become
useless when we do name tree calculation remotely, so this decision
branch for HTML rows needs to happen elsewhere.

Depends on D271309

Differential Revision: https://phabricator.services.mozilla.com/D271310
2025-11-21 19:10:01 +00:00
Cristina Horotan 5e77cab491 Revert "Bug 1998242, 1998255: apply code formatting via Lando" for causing wpt failures on /comp_tooltip.html DONTBUILD
This reverts commit 7b7f37ff69.

Revert "Bug 1998255 - P4: Calculate labeled names remotely. r=morgan"

This reverts commit 7265cce8b1.

Revert "Bug 1998255 - P3: Return eNameFromRelations when name was exclusively calculated from relations. r=morgan"

This reverts commit dbe3c2b954.

Revert "Bug 1998255 - P2: Have GetTextEquivFromIDRefs return true if it used hidden content or referenced itself. r=morgan"

This reverts commit f30cc8c2c8.

Revert "Bug 1998255 - P1: Intro and use ArrayAccIterator. r=morgan"

This reverts commit 312430263f.

Revert "Bug 1998242 - P5: Perform subtree name calculation in RemoteAccessible::Name. r=morgan"

This reverts commit 4deac16ef9.

Revert "Bug 1998242 - P4: Break up name calculation to allow remote subtree calc. r=morgan"

This reverts commit ab72073e90.

Revert "Bug 1998242 - P3: Introduce DirectName() to be used by Name(). r=morgan"

This reverts commit 6f8ce31065.

Revert "Bug 1998242 - P2: Don't rely on NativeName override to suppress subtree name calc. r=morgan"

This reverts commit 1fbfdefcef.

Revert "Bug 1998242 - P1: Factor out tooltip calculation. r=morgan"

This reverts commit 695b65952f.
2025-11-21 11:15:27 +00:00
Eitan Isaacson dbe3c2b954 Bug 1998255 - P3: Return eNameFromRelations when name was exclusively calculated from relations. r=morgan
In the case of a file input, never return eNameFromRelations in order to
force a cache of the name.

Depends on D272726

Differential Revision: https://phabricator.services.mozilla.com/D272727
2025-11-21 06:40:37 +00:00
Eitan Isaacson 1fbfdefcef Bug 1998242 - P2: Don't rely on NativeName override to suppress subtree name calc. r=morgan
Suppressing name tree calculation in local subclasses is going to become
useless when we do name tree calculation remotely, so this decision
branch for HTML rows needs to happen elsewhere.

Depends on D271309

Differential Revision: https://phabricator.services.mozilla.com/D271310
2025-11-21 06:40:21 +00:00
iulian moraru f06208ee3f Revert "Bug 1998242, Bug 1998255 1998255: apply code formatting via Lando" for causing dt failures on browser_accessibility_print_to_json.js.
This reverts commit d42283eaec.

Revert "Bug 1998255 - P4: Calculate labeled names remotely. r=morgan"

This reverts commit 4684fdbfa0.

Revert "Bug 1998255 - P3: Return eNameFromRelations when name was exclusively calculated from relations. r=morgan"

This reverts commit 15919fad2f.

Revert "Bug 1998255 - P2: Have GetTextEquivFromIDRefs return true if it used hidden content or referenced itself. r=morgan"

This reverts commit 2b6d3df0da.

Revert "Bug 1998255 - P1: Intro and use ArrayAccIterator. r=morgan"

This reverts commit c6454665b0.

Revert "Bug 1998242 - P5: Perform subtree name calculation in RemoteAccessible::Name. r=morgan"

This reverts commit 0629edfc29.

Revert "Bug 1998242 - P4: Break up name calculation to allow remote subtree calc. r=morgan"

This reverts commit 24e6864b25.

Revert "Bug 1998242 - P3: Introduce DirectName() to be used by Name(). r=morgan"

This reverts commit 63a23a03e0.

Revert "Bug 1998242 - P2: Don't rely on NativeName override to suppress subtree name calc. r=morgan"

This reverts commit 95638bb76c.

Revert "Bug 1998242 - P1: Factor out tooltip calculation. r=morgan"

This reverts commit 25a9efa9b2.
2025-11-21 01:23:56 +00:00
Eitan Isaacson 15919fad2f Bug 1998255 - P3: Return eNameFromRelations when name was exclusively calculated from relations. r=morgan
In the case of a file input, never return eNameFromRelations in order to
force a cache of the name.

Depends on D272726

Differential Revision: https://phabricator.services.mozilla.com/D272727
2025-11-20 20:07:56 +00:00
Eitan Isaacson 95638bb76c Bug 1998242 - P2: Don't rely on NativeName override to suppress subtree name calc. r=morgan
Suppressing name tree calculation in local subclasses is going to become
useless when we do name tree calculation remotely, so this decision
branch for HTML rows needs to happen elsewhere.

Depends on D271309

Differential Revision: https://phabricator.services.mozilla.com/D271310
2025-11-20 20:07:38 +00:00
Atila Butkovits 3f6df22bce Revert "Bug 1998242, Bug 1998255: apply code formatting via Lando" for causing failures at browser_selectables.js.
This reverts commit d0c68a8888.

Revert "Bug 1998255 - P4: Calculate labeled names remotely. r=morgan"

This reverts commit 3bfddbb990.

Revert "Bug 1998255 - P3: Return eNameFromRelations when name was exclusively calculated from relations. r=morgan"

This reverts commit a66669765f.

Revert "Bug 1998255 - P2: Have GetTextEquivFromIDRefs return true if it used hidden content or referenced itself. r=morgan"

This reverts commit 99158f058d.

Revert "Bug 1998255 - P1: Intro and use ArrayAccIterator. r=morgan"

This reverts commit 5d3dbed390.

Revert "Bug 1998242 - P5: Perform subtree name calculation in RemoteAccessible::Name. r=morgan"

This reverts commit 68053ff36f.

Revert "Bug 1998242 - P4: Break up name calculation to allow remote subtree calc. r=morgan"

This reverts commit 0d01bdd7e0.

Revert "Bug 1998242 - P3: Introduce DirectName() to be used by Name(). r=morgan"

This reverts commit 9ee273d6c6.

Revert "Bug 1998242 - P2: Don't rely on NativeName override to suppress subtree name calc. r=morgan"

This reverts commit 55dc166a46.

Revert "Bug 1998242 - P1: Factor out tooltip calculation. r=morgan"

This reverts commit 602b768450.
2025-11-20 06:39:20 +00:00
Eitan Isaacson a66669765f Bug 1998255 - P3: Return eNameFromRelations when name was exclusively calculated from relations. r=morgan
In the case of a file input, never return eNameFromRelations in order to
force a cache of the name.

Depends on D272726

Differential Revision: https://phabricator.services.mozilla.com/D272727
2025-11-20 03:55:52 +00:00
Eitan Isaacson 55dc166a46 Bug 1998242 - P2: Don't rely on NativeName override to suppress subtree name calc. r=morgan
Suppressing name tree calculation in local subclasses is going to become
useless when we do name tree calculation remotely, so this decision
branch for HTML rows needs to happen elsewhere.

Depends on D271309

Differential Revision: https://phabricator.services.mozilla.com/D271310
2025-11-20 03:55:35 +00:00
Alexandru Marc 284c082177 Revert (Bug 1998242, Bug 1998255) for causing build bustages @ nsTextEquivUtils.cpp
This reverts commit 7c76213cf0.

Revert "Bug 1998255 - P4: Calculate labeled names remotely. r=morgan"

This reverts commit ebe32a1bcc.

Revert "Bug 1998255 - P3: Return eNameFromRelations when name was exclusively calculated from relations. r=morgan"

This reverts commit f4a05b1359.

Revert "Bug 1998255 - P2: Have GetTextEquivFromIDRefs return true if it used hidden content or referenced itself. r=morgan"

This reverts commit bbd365ae27.

Revert "Bug 1998255 - P1: Intro and use ArrayAccIterator. r=morgan"

This reverts commit 4cf9fc73f1.

Revert "Bug 1998242 - P5: Perform subtree name calculation in RemoteAccessible::Name. r=morgan"

This reverts commit 5a3dff09a7.

Revert "Bug 1998242 - P4: Break up name calculation to allow remote subtree calc. r=morgan"

This reverts commit 69925bd2e6.

Revert "Bug 1998242 - P3: Introduce DirectName() to be used by Name(). r=morgan"

This reverts commit a0cf5d9cd6.

Revert "Bug 1998242 - P2: Don't rely on NativeName override to suppress subtree name calc. r=morgan"

This reverts commit a4155e38e4.

Revert "Bug 1998242 - P1: Factor out tooltip calculation. r=morgan"

This reverts commit 8c278d8b8f.
2025-11-20 00:22:53 +00:00
Eitan Isaacson f4a05b1359 Bug 1998255 - P3: Return eNameFromRelations when name was exclusively calculated from relations. r=morgan
In the case of a file input, never return eNameFromRelations in order to
force a cache of the name.

Depends on D272726

Differential Revision: https://phabricator.services.mozilla.com/D272727
2025-11-19 23:47:52 +00:00
Eitan Isaacson a4155e38e4 Bug 1998242 - P2: Don't rely on NativeName override to suppress subtree name calc. r=morgan
Suppressing name tree calculation in local subclasses is going to become
useless when we do name tree calculation remotely, so this decision
branch for HTML rows needs to happen elsewhere.

Depends on D271309

Differential Revision: https://phabricator.services.mozilla.com/D271310
2025-11-19 23:47:34 +00:00
Eitan Isaacson 41db1336ff Bug 2000297 - Don't do role check in table caption getter. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D272707
2025-11-15 03:27:37 +00:00
Masayuki Nakano f8236195a0 Bug 769207 - part 3: Make nsIMutationObserver use AttrModType r=smaug,dom-core,firefox-style-system-reviewers,layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D263054
2025-09-08 00:27:40 +00:00
Eitan Isaacson d5769a23eb Bug 1814504 - P1: Introduce Description() return flag. r=morgan
We need this to know if the description is derived from ARIA.

Differential Revision: https://phabricator.services.mozilla.com/D259351
2025-08-19 23:47:16 +00:00
Cosmin Sabou d6d8c72880 Revert "Bug 1814504 - P2: Implement AXCustomContent for mappings of aria-description and aria-describedby. r=morgan" for causing non-unified build bustages on mozAccessible.mm
This reverts commit 028aa274ee.

Revert "Bug 1814504 - P1: Introduce Description() return flag. r=morgan"

This reverts commit 2e8c06f206.
2025-08-18 21:49:59 +00:00
Eitan Isaacson 2e8c06f206 Bug 1814504 - P1: Introduce Description() return flag. r=morgan
We need this to know if the description is derived from ARIA.

Differential Revision: https://phabricator.services.mozilla.com/D259351
2025-08-18 21:08:43 +00:00
Emily McDonough 333a5d8431 Bug 1971607 - Make nsTableWrapperFrame::InnerTableFrame public and use it in some obvious locations. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D253390
2025-06-13 13:48:08 +00:00
Serban Stanca bdc90756e2 Revert "Bug 1971607 - Make nsTableWrapperFrame::InnerTableFrame public and use it in some obvious locations. r=dholbert" for causing marionette tests failures in test_no_errors_clean_profile.py TestNoErrorsNewProfile.test_no_errors.
This reverts commit 517a883233.
2025-06-13 02:47:54 +00:00
Emily McDonough 517a883233 Bug 1971607 - Make nsTableWrapperFrame::InnerTableFrame public and use it in some obvious locations. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D253390
2025-06-12 23:22:19 +00:00
Eitan Isaacson d263fd4451 Bug 1970234 - Add new eNameFromRelations name flag. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D252414
2025-06-09 18:04:37 +00:00
Atila Butkovits 98e0256221 Revert "Bug 1970235 - Don't show AXTitleUIElement in some conditions. r=morgan" for causing failures at browser_label_title.js.
This reverts commit 48db718d40.

Revert "Bug 1781153 - Simplify use of AXTitle/AXDescription. r=morgan"

This reverts commit 14eb8560c7.

Revert "Bug 1970234 - Add new eNameFromRelations name flag. r=morgan"

This reverts commit 799312555c.
2025-06-07 04:06:12 +00:00
Eitan Isaacson 799312555c Bug 1970234 - Add new eNameFromRelations name flag. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D252414
2025-06-07 02:12:16 +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
Amit Prakash Ambasta 896a01eb65 Bug 1889054 - Fix issues with non-unified builds missing header inclusions. r=emilio
Signed-off-by: Amit Prakash Ambasta <[email protected]>

Differential Revision: https://phabricator.services.mozilla.com/D207004
2024-04-09 12:09:53 +00:00
James Teh a34c364ee8 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 16935b4b44 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 963c5a7e19 Bug 1843389: HTMLTableCellAccessible::Col/RowExtent: Get the table frame from layout instead of walking the a11y tree. r=nlapre
In some edge cases (such as in accessible/tests/crashtests/1472024-1.html), there can be an outer HTML table which contains an inner table according to layout, but the inner table isn't included in the a11y tree.
The inner table has no semantic value, so including it wouldn't be appropriate.
However, HTMLTableAccessible::Col/RowExtent previously retrieved the table using the a11y tree, which meant we used the layout frame for the outer table instead of the inner table.
This resulted in assertions.
To fix this, always ask the cell's layout frame for the correct table frame, rather than walking the a11y tree.
As a bonus, this simplifies and trims the code somewhat.

Differential Revision: https://phabricator.services.mozilla.com/D184066
2023-07-21 04:03:39 +00:00
Nathan LaPre e98fa46a8b Bug 1840732 Part 6: Remove unnecessary includes from accessible/html, r=Jamie
This revision removes unnecssary include directives from cpp files in the
accessible/html directory. These suggestions came from the Include What You Use
tool.

Depends on D182400

Differential Revision: https://phabricator.services.mozilla.com/D182401
2023-07-07 03:22:08 +00:00
Nathan LaPre f07c364a26 Bug 1804054: Identify nested tables with non-zero cell border width as data tables,r=Jamie
This revision changes the table classification algorithm such that tables with
cells that have non-zero border width are identified as data tables. This revision
moves the check for border width above the nested table check, since we consider
that to be a more pertinent indicator. This revision also adds a test to verify
the changes.

Differential Revision: https://phabricator.services.mozilla.com/D181825
2023-06-23 19:54:28 +00:00
Emilio Cobos Álvarez 529c9ee321 Bug 1839922 - Remove usage of {Has,Get}Attr(kNameSpaceID_None, ..). r=edgar
We have more readable and faster versions (that just omit the namespace
arg).

Mostly done via sed, with a couple helpers to use the faster lookups
where possible.

Differential Revision: https://phabricator.services.mozilla.com/D181795
2023-06-23 10:01:32 +00:00
James Teh 8401e7c2ef 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 2ee4be5f92 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
James Teh 294523aaaa 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
Nathan LaPre c8a109e013 Bug 1711273: Preserve columnheader, rowheader roles with certain CSS displays set, r=Jamie
This revision addresses an issue with th elements within tables that don't have
the table CSS display style. In these cases, where we create an
ARIAGridCellAccessible for a th, we fail to report rowheader and columnheader
properly, since ARIAGridCellAccessible doesn't know how to handle th elements.
This revision fixes the problem by moving the th NativeRole logic into the
TableCellAccessible class, then calling that logic from both the ARIA grid cell
accessible NativeRole and from HTMLTableHeaderCellAccessible, as before. This
revision also updates tests reliant on the old behavior, including beefing up
an existing test aimed at this bug specifically.

Differential Revision: https://phabricator.services.mozilla.com/D163371
2022-12-01 20:17:32 +00:00
Ting-Yu Lin b22e7e6aa4 Bug 1799732 Part 1 - Replace GetChildList(kPrincipalList) with PrincipalChildList(). r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D161862
2022-11-12 04:38:52 +00:00
Noemi Erli a66dba1527 Backed out 3 changesets (bug 1799732) for causing build bustages in nsIFrame.cpp CLOSED TREE
Backed out changeset e559f9dbc76f (bug 1799732)
Backed out changeset c40fda7a8b0b (bug 1799732)
Backed out changeset 1f84bfb41ab8 (bug 1799732)
2022-11-12 02:16:45 +02:00
Ting-Yu Lin b79841292f Bug 1799732 Part 1 - Replace GetChildList(kPrincipalList) with PrincipalChildList(). r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D161862
2022-11-11 23:44:16 +00:00
Morgan Rae Reschenberg 964c8a87ec Bug 1799204: Update cached layout_guess when relevant HTML attr changes are obseved r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D161339
2022-11-08 21:52:48 +00:00
Stanca Serban e404cde02b Backed out changeset 835a66221d99 (bug 1799204) for causing mochitests failures on browser_table.js.CLOSED TREE 2022-11-08 21:27:58 +02:00
Morgan Rae Reschenberg 61f0aaec36 Bug 1799204: Update cached layout_guess when relevant HTML attr changes are obseved r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D161339
2022-11-08 17:56:58 +00:00