iTwin / iTwinUI

A design system for building beautiful and well-working web interfaces.
https://itwin.github.io/iTwinUI/
MIT License
92 stars 35 forks source link

remove `Tooltip` from DOM when ARIA is not used #2005

Closed mayank99 closed 2 weeks ago

mayank99 commented 2 weeks ago

Changes

This addresses a user complaint about Tooltip staying in DOM even when not visible. This is normally necessary for ARIA to work, but since IconButton uses ariaStrategy='none', we can remove the DOM element for this one specific scenario.

Testing

Manually verified in dev tools that the tooltip element is removed from DOM when it's not visible. Added a unit test for it too.

Docs

Added changeset.