Provide `no-redundant-roles` exception for `rowgroup` by khiga8 · Pull Request #531 · github/eslint-plugin-github
Relates to: https://github.com/github/accessibility/issues/5304
Follow-up to: https://github.com/github/accessibility/discussions/4921
What
This PR adds an exception so that the no-redundant-roles rule does not flag redundant use of rowgroup for:
<thead role="rowgroup"><tbody role="rowgroup">
Why
There have been 3 reported instances of false positives raised by this rule. All of these relate to redundant usage of role="rowgroup". Redundant usage of role="rowgroup" is necessary in some cases to ensure that table semantics are not dropped by screen readers.
The reported instances are:
- a screen reader/browser bug where table semantics were being dropped when
display: gridordisplay: contentsis used. Example - example in primer/react - a screen reader/browser bug where table semantics were being dropped when table header is missing. (Related: https://github.com/github/github/pull/261899#discussion_r1121141272)
It seems appropriate to not flag redundant use of role="rowgroup" for now. We can always revisit this in the future.
Why don't we turn this rule off completely?
All the reported false positives are for role="rowgroup" which we can except, so it does not seem worth turning the rule off completely.