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

Clarify tables, grids, treegrids #2359

Open
MelSumner opened this issue Oct 18, 2024 · 3 comments
Open

Clarify tables, grids, treegrids #2359

MelSumner opened this issue Oct 18, 2024 · 3 comments

Comments

@MelSumner
Copy link
Contributor

MelSumner commented Oct 18, 2024

Describe your concern

Looking at the descriptions for tables, grids, and tree grids, and how they're defined. They're causing some confusion on a team I'm currently working with, where we are seeking to define the boundaries for these kinds of elements/components.

Specifically:

  1. Clarify "selection state" in table: "If the tabular container maintains a selection state" with perhaps a note that means "i.e., selecting a row in an excel spreadsheet. This does not refer to a check box in a table column."
  2. Clarify if permitting column sorting on tables still qualifies it as a table, or if it should be a datagrid if sorting is supported. It's incredibly common to have sortable tables, and I haven't experienced AT issues with sortable tables (maybe others have and can chime in?)
  3. Add a note about the current state of treegrid; I've been consistently advised that treegrid is not well supported and should be avoided; if that's the case, should expandable rows in a data-type grid be avoided all together?

Link to the version of the specification or documentation you were looking at.

Table

ARIA 1.2 definition of the table role:

“The table role is intended for tabular containers which are not interactive. If the tabular container maintains a selection state, provides its own two-dimensional navigation, or allows the user to rearrange or otherwise manipulate its contents or the display thereof, authors SHOULD use grid or treegrid instead.”

Grid

ARIA 1.2 definition of the grid role:

“A composite widget containing a collection of one or more rows with one or more cells where some or all cells in the grid are focusable by using methods of two-dimensional navigation, such as directional arrow keys.

The grid role does not imply a specific visual, e.g., tabular, presentation. It describes relationships among elements. It may be used for purposes as simple as grouping a collection of checkboxes or navigation links or as complex as creating a full-featured spreadsheet application.

The cell elements of a grid have role gridcell. Authors MAY designate a cell as a row or column header by using either the rowheader or columnheader role in lieu of the gridcell role. Authors MUST ensure elements with role gridcell, columnheader, or rowheader are owned by elements with role row, which are in turn owned by an element with role rowgroup, or grid.”

TreeGrid

ARIA 1.2 definition of the treegrid role:

“A grid whose rows can be expanded and collapsed in the same manner as for a tree.”


Does the issue exists in the editors draft (the editors draft is the most recent draft of the specification)?

I perceive that it does.

@scottaohara
Copy link
Member

not going to lie, i think this is the first time that i've really given a hard look at the table definition here in the ARIA spec. Absolutely agree that there are some clarifications that could be made there. I think I better understand now why I've talked to some developers who have assumed that table sorting or resizing means it "HAS" to be a grid ...

@MelSumner
Copy link
Contributor Author

MelSumner commented Oct 21, 2024

@scottaohara for me, sorting should be fine on a table. If I saw a table and it didn't let me sort, I would likely be rather annoyed. But I wouldn't expect that to be a grid.

If folks want to resize or rearrange columns, I would say that would be a grid activity.

But also, I read some of @smhigley blog posts on this topic and she delineates them by usage, not necessarily features, which I find very interesting.

Now, it is entirely possible that these definitions are correct; perhaps they only need some examples to be added to really nail down what this means. But they feel like they need both an update to the definitions, and examples for additional clarity.

@scottaohara
Copy link
Member

@MelSumner agreed on the first point.

disagree that resize/rearrange means it needs to be a grid though. especially since those are actions that don't even require a table needs to be directly editable / keyboard focusable to do those (and often to make them fully accessible, additional non-grid related UI is often necessary).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants