Skip to content

label-has-associated-control regression #962

@EvgenyOrekhov

Description

@EvgenyOrekhov

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions