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

Please remove aria-haspopup="true" from tooltip markup #5300

Closed
carmacleod opened this issue Feb 7, 2020 · 0 comments · Fixed by #5301
Closed

Please remove aria-haspopup="true" from tooltip markup #5300

carmacleod opened this issue Feb 7, 2020 · 0 comments · Fixed by #5301

Comments

@carmacleod
Copy link
Contributor

If an element has aria-haspopup="true", it means "this element pops up a menu".

But a "bx--tooltip__trigger" div doesn't pop up a menu, so this is misleading to screen reader users.
(i.e. they will hear "menu button" or something similar, and expect to arrow through menu items; and some screen readers even give a keyboard hint that the user can type down arrow to open the menu, which doesn't make sense here).

Please see the special note in the ARIA spec for aria-haspopup:

NOTE
A tooltip is not considered to be a popup in this context.

Here is the markup in the Carbon React Storybook for Tooltip:

<div class="bx--tooltip__trigger" role="button" tabindex="0" aria-haspopup="true" aria-labelledby="__carbon-tooltip-trigger_bmbcpfuzeiu" aria-expanded="false">
  <svg>(?)</svg>
</div>

Please completely delete aria-haspopup from this markup. This attribute is not needed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant