reactjs / react-a11y

Identifies accessibility issues in your React.js elements
MIT License
2.34k stars 126 forks source link

Label checks should not apply to elements with role of "separator" #91

Open d-reinhold opened 9 years ago

d-reinhold commented 9 years ago

Separator role is a presentation role that doesn't need an additional label.

See https://developer.mozilla.org/en-US/docs/Web/Accessibility/AT-APIs/Gecko/Roles/ROLE_SEPARATOR, http://www.w3.org/TR/wai-aria/roles#separator

erin-doyle commented 6 years ago

It looks like we could use a whole new rule module for validating role="separator" based on the links you posted. It looks like we need to identify when the element is not focusable and is therefore seen as a structural element versus when it is focusable and is seen as an interactive widget. Based on each the rules will vary.

Specifically as it applies to whether a label is required or not it looks like when the element is focusable and there is more than one a label is required:

In applications where there is more than one focusable separator, authors SHOULD provide an accessible name for each one.

So it looks like it's more complicated then just not requiring a label whenever there is role="separator".