Open Bug 2070390 Opened 2 months ago Updated 1 month ago

Handle table property exposure for cells moved outside their backing table using aria-owns

Categories

(Core :: Disability Access APIs, defect)

defect

Tracking

()

People

(Reporter: morgan, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Attached file browser_xul_grid.js —

STR: Load the attached test case, or

  1. Load data:text/html,<div role="table"><div role="row"><div role="cell" id="cell">a</div></div></div><p aria-owns="cell">b
  2. Attempt to implicitly fetch the corresponding table for cell b by querying table properties like col number/col count/etc.

Expected:
Table properties are fechable and accurate, because the backing table is retrieved

Actual:
Table properties cannot be fetched, because the backing table cannot be found.

Severity: -- → S3

(In reply to Morgan Reschenberg [:morgan] from comment #0)

Expected:
Table properties are fechable and accurate, because the backing table is retrieved

I don't think this is feasible. Once a cell is moved outside of a table or moved into an incorrect table type, its table membership is effectively invalid. Trying to correct that would violate too many invariants held by both Gecko and clients; e.g. a table should be an ancestor of its cell, cells should be descendants of their table, a cell should be reachable as a flat sibling of other cells in its table, etc. I think the best we can do is fail gracefully. Exactly how we do that is an open question:

  1. We could recreate the cell as a generic. Tricky to get right without degrading perf because we'd have to special case a bunch of mutation paths.
  2. We could have AsTableCell return a dummy TableCellAccessible which returns safe failure values; e.g. row 0, col 0, table null. Kinda hacky, but simple.
  3. We could rename AsTableCell (or adjust header comments) so that it's clear that returning null is possible in this edge case, adjusting call sites accordingly.
Summary: Handle table property exposure for tables that contain a mix of custom table/cached table cell elements via aria-owns → Handle table property exposure for cells moved outside their backing table using aria-owns
Blocks: tablea11y
Attached file doc_xul_grid.xhtml —
See Also: → 1777962
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: