[a11y]: StructuredListRow does not have a 'row' role
See original GitHub issuePackage
carbon-components-react
Browser
Chrome
Operating System
MacOS
Package version
7.50.0
React version
No response
Automated testing tool and ruleset
IBM Equal Access Accessibility Checker Version 3.1.14
Assistive technology
No response
Description
In PAL’s ObservePlanTile the EditPlanSidePanel children uses a StructuredListRow component, which has several other StructuredListCell children.
At the moment the StructuredListRow has the label
property and the rows can get selected. Because it is a label instead of the div, the Accessibility Checker alerts us about the missing role.
If we delete the label
property, the row will become unselectable, but the violation would be solved.
Image from the original issue itself:
WCAG 2.1 Violation
IBM 4.1.2 Name, Role, Value
CodeSandbox example
https://codesandbox.io/s/structuredlistrow-a11y-nq66f-nq66f?file=/src/index.js
Steps to reproduce
It should be visible inside the codeSandbox example right away, but it looks like it can not check this issue inside the iframe tag
Code of Conduct
- I agree to follow this project’s Code of Conduct
- I checked the current issues for duplicate problems
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (3 by maintainers)
Top GitHub Comments
Thanks for the fixing! The violation related to the ‘row’ role no longer exists:
@mashenka123 The violation is not present in the v11/current storybook, and the rows now have a
role="row"
The 2 violations listed there are false positives from the storybook environment and not the component itself.