Skip to content

Disable accessibility warnings per directory #15728

@mquandalle

Description

@mquandalle

Describe the problem

I have a Sveltekit app where I want to keep accessibility warnings, except for the components in src/routes/admin which are only used by me, and where most of these warning (aria-labels, etc.) aren't relevant.

Currently I can only disable these warnings globally (but I want to keep them in my frontend) or add individuals <!-- svelte-ignore ... --> on each occurence, which is a bit tedious.

Describe the proposed solution

A way to disable a11y warnings on a directory, like it is possible for instance with eslint rules

I don't mind the exact implementation, it could be with the existing warningFilter option for instance

// svelte.config.js
compilerOptions: {
  warningFilter: (warning, pathname) => {
    return !pathname.startsWith('/src/routes/admin')
}

Importance

nice to have

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions