eslint-plugin-jsx-a11y
eslint-plugin-jsx-a11y copied to clipboard
Custom components should not check for no-access-key rules
Succeed
<div />
<CustomComponent accessKey="h" />
Fail
<div accessKey="h" />
I agree that this rule should only apply to HTML components; is that not the case?
it doesn't seem that.
Seems like we should add an option to ignore custom components, and leave a TODO comment to enable it by default in the next major.
Yes, all rules should not apply to custom components.
@ljharb this option to ignore custom components, is it for no-access-key
rule only?
@V2dha This specific issue is only for that rule; but in general, most of the rules in this plugin should probably ignore custom components by default. Since doing so would be semver-major, they'd all need an option to allow for that.