Skip to content

[feat] control-has-associated-label can't be configured to support parent elements with label props #987

Open
@fnune

Description

@fnune

From https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/control-has-associated-label.md#rule-options

labelAttributes is a list of attributes to check on the control component and its children for a label. Use this if you have a custom component that uses a string passed on a prop to render an HTML label, for example.

Unfortunately this only checks children elements of the component and won't allow for setups like this:

<Form.Item label="...">
  <Input />
</Form.Item>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions