[eslint-config-airbnb] `jsx-a11y/control-has-associated-label` config does not ignore `td` and `th` HTML elements
- Vorherrschende Sprache
- JavaScript
- Sterne
- 148k
- Forks
- 26.6k
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
At Material UI, we use `eslint-config-airbnb`, which includes `jsx-a11y` pre-defined rules. We’re encountering this error for `td` and `th` elements:
```
A control must be associated with a text label jsx-a11y/control-has-associated-label
```
Since `td` and `th` are non-interactive, they should be added to the `ignoreElements` list [here](https://github.com/airbnb/javascript/blob/c25bce83be4db06e6a221d79686c485cd2ed5d5d/packages/eslint-config-airbnb/rules/react-a11y.js#L77-L85) and not parsed by jsx-a11y plugin.
This is preventing us from bumping `eslint-plugin-jsx-a11y`: https://github.com/mui/material-ui/pull/39752.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne bei packages/eslint-config-airbnb/rules/react-a11y.js, insbesondere bei der verknüpften ignoreElements-Konfiguration, und überprüfe, wie die jsx-a11y-Regel dort konfiguriert ist. Stelle sicher, dass td und th von control-has-associated-label ignoriert werden und dass die Konfiguration weiterhin mit der neueren Version von eslint-plugin-jsx-a11y funktioniert.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- eslint, javascript
- Bereich
- accessibility, tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 45/100