Skip to content

Svelte 5: a11y-structure regression #10370

@mrwokkel

Description

@mrwokkel

Describe the bug

<script lang="ts">
  // whithout lang="ts" no warning.
</script>

<figure>
  <figcaption>A a11y-structure regression</figcaption>
</figure>

Gives a A11y: <figcaption> must be an immediate child of <figure> warning

It dit not when using "svelte": "5.0.0-next.43"

Reproduction

https://github.com/mrwokkel/figcaption/blob/main/src/routes/%2Bpage.svelte

Logs

No response

System Info

System:
    OS: macOS 14.3
    CPU: (10) arm64 Apple M1 Max
    Memory: 92.84 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.10.0 - ~/.nvm/versions/node/v20.10.0/bin/node
    npm: 10.2.3 - ~/.nvm/versions/node/v20.10.0/bin/npm
    pnpm: 8.15.1 - ~/Library/pnpm/pnpm
  Browsers:
    Chrome: 121.0.6167.139
    Safari: 17.3
  npmPackages:
    svelte: 5.0.0-next.44 => 5.0.0-next.44

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