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 · 10 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

Here's reproduction repo: https://github.com/frantic1048/eslint-plugin-jsx-a11y-issue-959

It appears that this issue is related to the case where a <th> element has only one self-closing child tag.

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

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