Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A11y warning when nesting an input inside <label> via another Component #8080

Closed
Lootwig opened this issue Dec 4, 2022 · 2 comments
Closed

Comments

@Lootwig
Copy link

Lootwig commented Dec 4, 2022

Describe the bug

When an input is not present inside a svelte file's label, but part of a child component, vite build gives out the warning

A11y: A form label must be associated with a control.

Since I'm using a component for most of my inputs, this yields a ton of warnings during build and it would be preferable not having to disable the warning entirely.

Reproduction

https://svelte.dev/repl/e6db2ee1c9714b348c284c26d3aeecfb?version=3.53.1

Logs

No response

System Info

System:
    OS: Windows 10 10.0.19044
    CPU: (24) x64 AMD Ryzen 9 3900X 12-Core Processor
    Memory: 9.50 GB / 31.90 GB
  Binaries:
    Node: 16.16.0 - C:\Program Files\nodejs\node.EXE
    npm: 8.18.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 107.0.5304.121
    Edge: Spartan (44.19041.1266.0), Chromium (107.0.1418.62)
    Internet Explorer: 11.0.19041.1566
  npmPackages:
    svelte: ^3.53.1 => 3.53.1

Severity

annoyance

@Prinzhorn
Copy link
Contributor

#6469

@Lootwig
Copy link
Author

Lootwig commented Dec 4, 2022

Thanks. I had only seen a closed issue on this, without an obvious reason being given.

@Lootwig Lootwig closed this as completed Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants