Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow tooltips to label non-interactive triggers #246

Merged
merged 1 commit into from
Sep 6, 2024

Commits on Sep 5, 2024

  1. Allow tooltips to label non-interactive triggers

    The combination of tooltip labels and non-interactive triggers was problematic: The tooltip component would place the label on the span element that it creates, rather than your provided trigger element. If your trigger was an icon or image, then accessibility tooling would flag it as missing a label. You might try putting aria-hidden on the element, but then you would still end up with the label being on an element that lacks a role (which is illegal).
    
    The solution I've implemented here is to move the aria-labelledby and aria-describedby attributes to the trigger.
    robintown committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    ecb25ce View commit details
    Browse the repository at this point in the history