Closed Bug 1832261 Opened 1 year ago Closed 1 year ago

[CTW] Remove most of HTMLTable*Accessible

Categories

(Core :: Disability Access APIs, task)

task

Tracking

()

RESOLVED FIXED
116 Branch
Tracking Status
firefox116 --- fixed

People

(Reporter: Jamie, Assigned: Jamie)

References

(Blocks 3 open bugs)

Details

(Whiteboard: [ctw-postship])

Attachments

(1 file)

Now that Cache the World is enabled by default everywhere, we use CachedTableAccessible for HTML tables. We can get rid of most of the code in the HTMLTable*Accessible classes. However, there are still a few things we depend on there:

  1. Calculation of the role for header cells.
  2. Retrieval of the row/colspan from layout.

We need to work out whether we want to keep the classes, make these utility functions or something else. Ideally, we would get rid of TableAccessible and just have TableAccessibleBase, since having both is a little confusing and mostly unnecessary. However, that does make things awkward for the above cases, since we need some way of accessing that data from LocalAccessible.

Blocks: tablea11y
Depends on: 1835967
Blocks: 1832228

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. HTMLTableAccessible are now used for all <table>, <td>, <th> and <tr> elements and MathML equivalents. ARIAAccessible 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, row and cell roles are now specified in HTMLMarkupMap and MathMLMarkupMap, rather than overriding NativeRole.
  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.
Assignee: nobody → jteh
Status: NEW → ASSIGNED
Pushed by jteh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/956690fe06d1 Remove most of HTMLTable*Accessible. r=nlapre
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch
Blocks: 1773119
Blocks: 1810628
Blocks: 1838718
Blocks: 1832372
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: