[DX] Lint: jsx-a11y is ignored
Following rules should be enforced in project:
Current
"jsx-a11y/click-events-have-key-events": 0,
"jsx-a11y/no-static-element-interactions": 0,
"jsx-a11y/anchor-is-valid": [
"error",
{
"components": [
"next/link"
],
"specialLink": [
"hrefLeft",
"hrefRight"
],
"aspects": [
"invalidHref",
"preferButton"
]
}
]
Proposed :D
Can we vote on this?
@DorijanH @radovix Can you elaborate why we don't want to conform to a11y rules?
@AleksandarDev @radovix I'm not sure when was this added but I found this eslint-plugin-jsx-a11y issue where this was suggested as a hacky workaround. Also, here's a link to a discussion on Next.js repo.
I think this can be removed now since Next.js 13 now renders the Link component correctly (a is no longer needed to be nested).
As for "jsx-a11y/no-static-element-interactions": 0, I'm guessing this was added to prevent linting errors when trying to add an onClick on elements like <div>, which I know we do most of the time. But that can be prevented by role attribute.