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 use case for aria-selected for 'grid' role descendants #2403

Open
turjmner8 opened this issue Dec 20, 2024 · 1 comment
Open

Clarify use case for aria-selected for 'grid' role descendants #2403

turjmner8 opened this issue Dec 20, 2024 · 1 comment

Comments

@turjmner8
Copy link

turjmner8 commented Dec 20, 2024

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

@scottaohara
Copy link
Member

again, this PR might help with at least some aspects of this issue - #2390

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