Open Bug 1656339 Opened 4 years ago Updated 4 years ago

Accessibility tree: td in treegrid is cell

Categories

(Core :: Disability Access APIs, defect)

80 Branch
defect

Tracking

()

People

(Reporter: carolynmacleod4, Unassigned)

References

(Blocks 1 open bug)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0

Steps to reproduce:

  1. Go to https://codepen.io/carmacleod/full/LYGKMMq
  2. Inspect one of the td elements in the Accessibility tree
  3. This table has an explicit role of "treegrid" but the td has a role of cell (should be gridcell)

Actual results:

td has implicit role of cell

Expected results:

td in treegrid should have implicit role of gridcell

(also, what does role="tree table" mean? I would expect this treegrid to have a role of "treegrid" in the accessibility tree.)

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Disability Access APIs
Product: Firefox → Core

(In reply to Carolyn MacLeod from comment #0)

td in treegrid should have implicit role of gridcell

I agree, though this also needs to be fixed in the HTML AAM. Currently, the HTMl AAM has mappings for td with table and grid roles, but not treegrid:
https://w3c.github.io/html-aam/#html-element-role-mappings

Implementation note: We should be able to handle this here where we handle grid -> implicit gridcell:
https://searchfox.org/mozilla-central/rev/0e309417bdc73be33fc93f6bd7a0d4063d2c6e51/accessible/generic/Accessible.cpp#1462

(also, what does role="tree table" mean? I would expect this treegrid to have a role of "treegrid" in the accessibility tree.)

The roles exposed in the accessibility tree are Firefox roles, not ARIA roles. For example, there are roles for which there is no equivalent in ARIA; e.g. text and text leaf. The Firefox "tree table" role existed before ARIA treegrid. That said, I get that this is confusing for web devs. We should potentially consider changing the friendly role names to match ARIA wherever possible, though that should be handled in a different bug.

Blocks: aria
Status: UNCONFIRMED → NEW
Ever confirmed: true
Severity: -- → S3

(In reply to James Teh from comment #2)

I opened HTML AAM issue #298 for td and th in treegrid having implied role of gridcell.
I also provided a PR (easy fix - was just an oversight), so hopefully that will be merged soon.

I created bug #1658480 to remember to change "tree table" to "treegrid" in the a11y tree.

The HTML AAM issue is fixed and merged, so the entry for td (and th) in treegrid now says that:

td (ancestor table element has grid or treegrid role)

has:

gridcell role

So it should be ok to go ahead with this fix now. :)
Thanks, @jamie!

You need to log in before you can comment on or make changes to this bug.