Skip to content

Improve filter options for a11y warnings #15100

Open
@dominikg

Description

@dominikg

Describe the problem

Some custom elements support a11y internally but still offer standard onclick etc.
These trigger a11y warnings for missing keyboard event handlers etc. Not all of these warnings include the tagname of the element that triggered the warning, so that filtering them via compileOptions.warningFilter or onwarn in svelte.config.js can be cumbersome (best option today is a regex over warning.frame)

see sveltejs/vite-plugin-svelte#1073

Describe the proposed solution

Make sure to always include the tagname in warning.message in a consistent format, eg start or end the warning with (<some-tag>) or add a new property to warning called tagname that is set in case the warning is about a specific tag in the template.

Importance

nice to have

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