react-starter icon indicating copy to clipboard operation
react-starter copied to clipboard

[DX] Lint: jsx-a11y is ignored

Open AleksandarDev opened this issue 3 years ago • 2 comments

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?

AleksandarDev avatar Nov 23 '22 15:11 AleksandarDev

@DorijanH @radovix Can you elaborate why we don't want to conform to a11y rules?

AleksandarDev avatar Apr 18 '23 14:04 AleksandarDev

@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.

DorijanH avatar Apr 18 '23 14:04 DorijanH