Skip to content

false positive a11y warning for label with control inside component #12002

Closed
@Rich-Harris

Description

@Rich-Harris

Describe the bug

The a11y_label_has_associated_control warning yields false positives in the case where the control is inside a component:

<script>
  import Input from './Input.svelte';
</script>

<label>
  <Input />
</label>

We should omit the warning if a component exists inside the label.

Reproduction

demo

Logs

No response

System Info

next

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions