Skip to content

"Legend" element inside "optgroup" Svelte5+Svelte Language Server #16129

@flexlex

Description

@flexlex

Describe the bug

I get a Runtime error when inseritng an <legend> tag inside <optgroup> inside of an <select> element.
As far as i've read on MDN, this is valid HTML.
Doing: {@html "<legend>Mamma Mia</legend>"} the browser doesn't "repair" the legend element.

Reproduction

https://svelte.dev/playground/hello-world?version=5.33.19#H4sIAAAAAAAACm2NzU7DMBCEX8XaS0GKsLgaE4lbOfAEDQcTTytL67UVb1tQ1XdHCeHnwHG-_XbmQhIyyNEWzMWcy8TR3CAmRbyljvaJ0cjtLqQfdfZmQN3311Otd-0E1pm9hYb_-FhEIdrIkW_jlKr2gwzKUDPr5tFslt3NwyDe_hriGxjjl-1L1cNUjnVJg3rGARL7l5BzMDkFb1ey3kvVVKR_VmRz7-0alyr7p8vbnxHqSPGu5HQ64vrakYbE5ySR3D5ww_UTjIdxoy0BAAA=

Logs

System Info

Any

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueA small, encapsulated issue, ideal for a new contributor to Svelte to tackle.help wanted

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions