Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes: #170
This PR adds a mapping of
Box
todiv
to expand a11y linting coverage.eslint-plugin-github
has an a11y rule,a11y-role-supports-aria-props
, which will flag invalid ARIA usage such as:The plugin can lint the above markup by reading the value of the
as
prop, and interpreting it as adiv
.However, because we don't have a mapping defined for
Box
for whenas
isn't set, the following isn't currently flagged even though it should be flagged as invalid:This PR should will address this issue. I've tested this in dotcom.
I opted to only add the mapping for
eslint-plugin-github
because we have not enabled polymorphic linting forjsx-a11y
rules yet, and if we define the mapping forjsx-a11y
, it may raise false positives by always treatingBox
as adiv
.