You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When dealing with something like selection states in a 'grid' role element, aria-selected='true' can be set on both, 'row' role elements and 'gridcell' elements. For a grid supporting single or multiple cell selection, it makes sense to set aria-selected on the cells themselves.
For row selection concepts, to me it seems like the spec implies that the 'row' elements would have aria-selected of true/false, but that is not actually specified as far as I can tell, and some screen readers don't seem to convey that information.
For column selection concepts, it is much less clear, especially if only single selection is allowed (with aria-multiselectable set to false on the 'grid' itself). If a column was going to be marked as selected, it seems like the only viable way of doing that would be to mark every cell in the logical column as selected, though that would seem to run contrary to multiple selection not being allowed. It is also not as clear in that case what elements aria-selected='false' would be required / expected to be set on for non-selected columns (just the 'columnheader' role elements, or all cells?)
I have tested a number of combinations of aria-selected being set on different role elements, and I don't seem to be able to find a consistent way of representing row and column selection, but I'm not sure what combination is really expected or should be expected.
If the current aria-selected concept is not quite capable of handling these concepts without introducing ambiguity as to what is actually selected / selectable in a 'grid' element, would it be possible to look into introducing more specific aria attributes to help clarify? Potentially aria-column-selected, aria-row-selected, etc...
Thanks for any clarifications here.
Link to the version of the specification or documentation you were looking at at.
So my thoughts behind this is that there are valid use cases where interactions with grids involve only being able to select rows, columns, or individual cells. There are also cases where interactions with grids can involve selecting any combination of those things, not necessarily just cells or just rows.
For visual users, this is very apparent based on background color or border changes that can clearly apply to all cells in the row or column, or just the cell interacted with.
For unsighted users though, the markup available for selection state is just on the cell element (or potentially the row element), but does not convey anything about other related cell selection state updates. Even with just aria-selected being available on row and cell elements today, it doesn't seem like screen readers distinguish between the 2 locations much if at all, and at a minimum it would be potentially helpful to clarify the intent here. If the row element was not required anymore due to the desire to have less restrictive DOM setups though (my other suggestion: #2402), then it would be even harder for a non-sighted user to know if they just selected a row vs a cell vs a column even with that distinction.
Issue Description
When dealing with something like selection states in a 'grid' role element, aria-selected='true' can be set on both, 'row' role elements and 'gridcell' elements. For a grid supporting single or multiple cell selection, it makes sense to set aria-selected on the cells themselves.
For row selection concepts, to me it seems like the spec implies that the 'row' elements would have aria-selected of true/false, but that is not actually specified as far as I can tell, and some screen readers don't seem to convey that information.
For column selection concepts, it is much less clear, especially if only single selection is allowed (with aria-multiselectable set to false on the 'grid' itself). If a column was going to be marked as selected, it seems like the only viable way of doing that would be to mark every cell in the logical column as selected, though that would seem to run contrary to multiple selection not being allowed. It is also not as clear in that case what elements aria-selected='false' would be required / expected to be set on for non-selected columns (just the 'columnheader' role elements, or all cells?)
I have tested a number of combinations of aria-selected being set on different role elements, and I don't seem to be able to find a consistent way of representing row and column selection, but I'm not sure what combination is really expected or should be expected.
If the current aria-selected concept is not quite capable of handling these concepts without introducing ambiguity as to what is actually selected / selectable in a 'grid' element, would it be possible to look into introducing more specific aria attributes to help clarify? Potentially aria-column-selected, aria-row-selected, etc...
Thanks for any clarifications here.
Link to the version of the specification or documentation you were looking at at.
Link to documentation:
https://www.w3.org/TR/wai-aria-1.2/#aria-selected
https://www.w3.org/TR/wai-aria-1.2/#aria-multiselectable
https://www.w3.org/TR/wai-aria-1.2/#row
https://www.w3.org/TR/wai-aria-1.2/#gridcell
https://www.w3.org/TR/wai-aria-1.2/#columnheader
Does the issue exists in the editors draft (the editors draft is the most recent draft of the specification)?
Yes
The text was updated successfully, but these errors were encountered: