spectrum-web-components icon indicating copy to clipboard operation
spectrum-web-components copied to clipboard

[Bug][a11y]: Table examples show no way of declaring a cell as the row header

Open majornista opened this issue 1 year ago • 1 comments

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?

  1. Go to '...'
  2. Click on '....'
  3. Scroll to '....'
  4. Check console
  5. See error

Sample code that illustrates the problem

No response

Logs taken while reproducing problem

No response

majornista avatar Jun 29 '23 18:06 majornista

Tasks:

  • [ ] Update the type for role to be typesafe
  • [ ] Update documentation to include usage of the types
  • [x] Ensure rowheader labels the checkbox

najikahalsema avatar Oct 26 '23 14:10 najikahalsema

Fixed via #4145

najikahalsema avatar Aug 07 '24 16:08 najikahalsema