spectrum-web-components
spectrum-web-components copied to clipboard
[Bug][a11y]: Table selected row state without "selects" specified lacks sufficient contrast
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 distinguish a selected row from a not selected row even when the selection checkbox is not present.
See React-Spectrum for a positive example: https://react-spectrum.adobe.com/react-spectrum/TableView.html#highlight-selection
Actual behavior
Selected row state with not selects attribute specified lacks sufficient contrast to distinguish selected rows from not selected rows, which is a failure of WCAG 2.1 Success Criterion 1.4.11 Non-text Contrast
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
Could you elaborate on this issue or provide some steps to reproduce? I took a look at the styles and it looks like a row without a checkbox that is marked with the selected attribute does show as a highlighted blue (and in Spectrum CSS when the is-selected class is applied). It looks like this may be more of a functionality update? Are you looking for rows to be marked as selected by clicking them like in the React example linked? It doesn't look like SWC currently has the selectionStyle="highlight" functionality.
We should check to see if this is still true since Josh's work has finished.