jsx-eslint / eslint-plugin-jsx-a11y

Static AST checker for a11y rules on JSX elements.
MIT License
3.38k stars 637 forks source link

label-has-associated-control regression #962

Open EvgenyOrekhov opened 10 months ago

EvgenyOrekhov commented 10 months ago

Looks like controlComponents option is no longer respected.

The following code now gives A form label must be associated with a control warning:

/* eslint
  "jsx-a11y/label-has-associated-control": [
    "error", { "controlComponents": ["InputComponent"] },
  ],
*/

function MyComponent() {
  return (
    <label>
      My label
      <InputComponent />
    </label>
  );
}

Started happening after upgrade from 6.7.1 to 6.8.0.