Skip to content

Accessibility: Replace title attribute with aria-label to avoid intrusive tooltipΒ #13

@AlexisDevjs

Description

@AlexisDevjs

Hello πŸ‘‹

First of all, thank you for this excellent library β€” I'm using it in a project with Astro and React, and I love its simplicity and design.

However, I noticed that you're making use of the title attribute on Toast elements. For example, the Toast closeButton has the attribute title="Close Toast," which generates a visual tooltip on hover.

From a UX perspective, and personally, this can be intrusive, especially for components that need to be discreet, like toasts.

To maintain accessibility without affecting the visual experience, I think it would be more appropriate to use the aria-label attribute. For example, in the case of the close button, it would be aria-label="Close Toast" instead of title. This allows screen readers to correctly interpret the button's purpose without displaying the browser's default tooltip.

Reference: MDN on aria-label

Would it be possible to consider this change in a future release?

Additionally, at the end of this message I attach some screenshots about this problem.

Thank you for your work, I love this library and thanks in advance for considering this suggestion!

Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions