Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] aria-rowcount and aria-rowindex vs. aria-setsize and aria-posinset for treegrid #1442

Closed
NeoDobby opened this issue Jul 10, 2020 · 2 comments
Labels
agenda Include in upcoming Authoring Practices Task Force meeting Practice Page Related to a page within the practices section of the APG question Issue asking a question

Comments

@NeoDobby
Copy link

NeoDobby commented Jul 10, 2020

In the aria practices, it is specified that table, grid and treegrid must specify the aria-rowcount and aria-rowindex attributes if not all rows are in the DOM. But it is not completely clear how this should work within a treegrid.

Is the rowcount to include all rows in the table or just root-level rows? And related to that, is the rowindex supposed to be only the index within the list of top level rows, or all the rows?

  • If all rows should be included, this would make it really difficult to handle in scenarios where child rows are only loaded when expanding, and it's impossible to find out what the total would be if all rows are expanded without requesting data about the children of each expandable item.
  • If only top level rows are included, would this not already be covered by using aria-setsize and aria-posinset on all levels of the hierarchy?

So essentially, should rowcount and rowindex really be required for treegrid if setsize and posinset would be enough to appropriately define the tree hierarchy?

@mcking65
Copy link
Contributor

@NeoDobby, these are really good questions. I don't think we've really thought this through.

It does seem like we have made aria-rowindex redundant with aria-posinset in treegrids. The spec says the following for aria-posinset:

If all items in a set are present in the document structure, it is not necessary to set this attribute, as the user agent can automatically calculate the set size and position for each item. However, if only a portion of the set is present in the document structure at a given moment, this property is needed to provide an explicit indication of an element's position.

The same redundancy also exists between aria-rowcount and aria-setsize.

I believe you should be safe using aria-posinset and aria-setsize in a treegrid and not using aria-rowindex and aria-rowcount. However, I will raise this for group discussion in an upcoming authoring practices meeting.

I have also raised it for discussion in the specification working group with w3c/aria#1303.

@mcking65 mcking65 added Practice Page Related to a page within the practices section of the APG question Issue asking a question agenda Include in upcoming Authoring Practices Task Force meeting labels Jul 19, 2020
@NeoDobby
Copy link
Author

Thank you, that helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agenda Include in upcoming Authoring Practices Task Force meeting Practice Page Related to a page within the practices section of the APG question Issue asking a question
Projects
None yet
Development

No branches or pull requests

2 participants