Skip to content

Incorrect aria-label reminder for inert buttons #15814

Open
@justingolden21

Description

@justingolden21

Describe the problem

Buttons and links should either contain text or have an aria-label or aria-labelledby attribute
https://svelte.dev/e/a11y_consider_explicit_label

Image

Describe the proposed solution

If buttons have inert, then they shouldn't require aria-label.

Please run this by someone who is an a11y expert in case my understanding of inert is wrong.

I have a button behind nav to click to close, but when changing pages I get this warning:

Image

It seems insert is the correct property to use rather than aria-hidden, but svelte will (incorrectly in my opinion) assert that it needs a label. If it's hidden from screen readers, it shouldn't need an aria label, right?

Thanks in advance. Let me know if I'm wrong.

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