aria-setsize and aria-posinset were allowed on tr (when descendant of treegrid) in the ARIA spec in August 2018, but it seems that propagating that change to ARIA in HTML must have slipped through the cracks.
While the row role can be used in a table, grid, or treegrid, the semantics of aria-expanded, aria-posinset, aria-setsize, and aria-level are only applicable to the hierarchical structure of an interactive tree grid. Therefore, authors MUST NOT apply aria-expanded, aria-posinset, aria-setsize, and aria-level to a row that descends from a table or grid, and user agents SHOULD NOT expose any of these four properties to assistive technologies unless the row descends from a treegrid.
So ARIA in HTML needs to be updated as follows:
tr element needs to allow explicit role="row" if in "treegrid" (as well as grid), i.e.:
role=row, may be explicitly declared when child of a table element with role=grid or treegrid
row role needs to add aria-setsize and aria-posinset to the list of supported properties, and (somehow) say that aria-expanded, aria-posinset, aria-setsize, and aria-level are only supported if in a treegrid
Please see https://github.com/w3c/aria/issues/558
aria-setsize and aria-posinset were allowed on tr (when descendant of treegrid) in the ARIA spec in August 2018, but it seems that propagating that change to ARIA in HTML must have slipped through the cracks.
ARIA for role="row" currently says:
So ARIA in HTML needs to be updated as follows:
role="row"
if in "treegrid" (as well as grid), i.e.:I will provide a PR shortly.