Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DX] Lint: jsx-a11y is ignored #384

Open
AleksandarDev opened this issue Nov 23, 2022 · 2 comments
Open

[DX] Lint: jsx-a11y is ignored #384

AleksandarDev opened this issue Nov 23, 2022 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers question Further information is requested

Comments

@AleksandarDev
Copy link
Member

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 AleksandarDev added enhancement New feature or request good first issue Good for newcomers question Further information is requested labels Nov 23, 2022
@AleksandarDev
Copy link
Member Author

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

@DorijanH
Copy link
Member

DorijanH commented Apr 18, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants