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

jsx-a11y/control-has-associated-label throws an error on table elements #959

Open
elianarlivingston opened this issue Nov 3, 2023 · 19 comments
Assignees

Comments

@elianarlivingston
Copy link

Hello! I'm experiencing an issue with lint on the 'td' or 'th' elements. Is it correct that this error is being generated? Thank you in advance!

Captura de pantalla 2023-11-03 a la(s) 03 52 41
@christopher-william
Copy link

I have the same problem, with this version 6.8

@AlanGreene
Copy link

I've just run into the same issue updating to 6.8.0.

From a quick review of the changelog and recent history it looks like an intentional change, or at the very least a side effect of an intentional change: #919

In my case it's triggered by an empty <td> used in a skeleton loading state.

@ZeeshanTamboli
Copy link

Same issue for us in Material UI - mui/material-ui#39752.

@EKarpinsky

This comment was marked as spam.

@jessebeach

This comment was marked as resolved.

@frantic1048
Copy link

We are sticking to the older 6.7.1 version to avoid this issue.

Versions 6.8 and the recent 6.9 still encounter this issue.

frantic1048 added a commit to RightCapitalHQ/frontend-style-guide that referenced this issue Jun 28, 2024
@ljharb
Copy link
Member

ljharb commented Jun 28, 2024

@elianarlivingston @christopher-william @frantic1048 can you provide some code that reproduces the issue?

@frantic1048
Copy link

@ZeeshanTamboli
Copy link

ZeeshanTamboli commented Aug 14, 2024

Shouldn't th and td be added to ignoreElements in the rule here since they are non-interactive? Would that fix the issue?

@ljharb
Copy link
Member

ljharb commented Aug 22, 2024

I suppose that'd be one solution.

@ZeeshanTamboli
Copy link

I suppose that'd be one solution.

@ljharb I can add that. But will eslint-config-airbnb be released? I am hesitant because I see it was released two years ago. We extend eslint-config-airbnb which has this a11y rule.

@ljharb
Copy link
Member

ljharb commented Dec 6, 2024

@ZeeshanTamboli the rule is part of this plugin, not the airbnb config, so you don't need the airbnb config to do anything to be able to use new releases of this plugin. that said, yes, the airbnb config will be released for eslint 9 support once everything it depends on has it.

@ZeeshanTamboli
Copy link

@ljharb I understand the rule is part of this plugin. What I meant is that we extend the Airbnb config (extends: ['eslint-config-airbnb']), which uses the rule defined here. If I update the ignoreElements list there, wouldn’t eslint-config-airbnb need a new release?

@ljharb
Copy link
Member

ljharb commented Dec 7, 2024

You can override that rule config however you like, without a new release.

@ZeeshanTamboli
Copy link

ZeeshanTamboli commented Dec 7, 2024

You can override that rule config however you like, without a new release.

Yes, but that would be a workaround just to wait for the actual fix to happen. Overriding to just add the two elements in the list.

@ljharb
Copy link
Member

ljharb commented Dec 7, 2024

Yep, that's right

@ZeeshanTamboli
Copy link

ZeeshanTamboli commented Dec 7, 2024

Yep, that's right

:P So can't we release eslint-config-airbnb minor patch with the fix?

@ljharb
Copy link
Member

ljharb commented Dec 7, 2024

This wouldn't be the repo to ask on, and this is an issue about this plugin, not about the airbnb config.

@ZeeshanTamboli
Copy link

This wouldn't be the repo to ask on, and this is an issue about this plugin, not about the airbnb config.

Agree. Created airbnb/javascript#3069.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants