spectrum-web-components
spectrum-web-components copied to clipboard
[Bug][a11y]: Table examples show no way of declaring a cell as the row header
Code of conduct
- [X] I agree to follow this project's code of conduct.
Impacted component(s)
Table
Expected behavior
It should be possible to declare a column as the rowheader for a virtualized table, and the rowheader should be used to help label the checkbox used to select the row.
Actual behavior
While it is possible to override the default role for sp-table-cell
of gridcell
with rowheader
, documentation and storybook examples show no way of declaring a cell as the row header for the row.
Being able to declare the rowheader is important for setting the label for the checkbox that selects a row.
Additional concerns: the role
for sp-table-cell
should be type safe, 'gridcell' | 'rowheader' | 'cell'
.
Screenshots
No response
What browsers are you seeing the problem in?
No response
How can we reproduce this issue?
- Go to '...'
- Click on '....'
- Scroll to '....'
- Check console
- See error
Sample code that illustrates the problem
No response
Logs taken while reproducing problem
No response
Tasks:
- [ ] Update the type for role to be typesafe
- [ ] Update documentation to include usage of the types
- [x] Ensure
rowheader
labels the checkbox
Fixed via #4145