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

Avoid chaining aria-labelledby on tooltips #254

Closed
wants to merge 1 commit into from

Commits on Oct 1, 2024

  1. Avoid chaining aria-labelledby on tooltips

    aria-labelledby cannot be chained (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-labelledby#benefits_and_drawbacks). So, it's not good practice to be setting aria-labelledby on both the anchor and the tooltip element.
    
    The basic issue that I believe initially motivated the chaining was to distinguish the caption from the main tooltip content (by setting both aria-labelledby and aria-describedby on the tooltip element), so that the caption would not be considered part of the anchor's accessible label. But this was never actually working. The only good solution seems to be setting aria-labelledby and aria-describedby on the anchor to point directly to the label and caption elements.
    robintown committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    72aa36a View commit details
    Browse the repository at this point in the history