diff --git a/src/Tooltip/js/core/createTooltips.js b/src/Tooltip/js/core/createTooltips.js index b8c4cc2..8189bdf 100644 --- a/src/Tooltip/js/core/createTooltips.js +++ b/src/Tooltip/js/core/createTooltips.js @@ -31,7 +31,6 @@ export default function createTooltips(els) { if (!title && !html) return a el.setAttribute('data-tooltipped', '') - el.setAttribute('aria-describedby', `tippy-tooltip-${id}`) removeTitle(el) const popper = createPopperElement(id, title, settings) diff --git a/src/Tooltip/js/tippy.js b/src/Tooltip/js/tippy.js index ae4a03f..87cf5b0 100644 --- a/src/Tooltip/js/tippy.js +++ b/src/Tooltip/js/tippy.js @@ -211,6 +211,7 @@ class Tippy { popper.style.visibility = 'visible' popper.setAttribute('aria-hidden', 'false') + el.setAttribute('aria-describedby', popper.id) // Wait for popper's position to update defer(() => { @@ -303,6 +304,7 @@ class Tippy { popper.style.visibility = 'hidden' popper.setAttribute('aria-hidden', 'true') + el.removeAttribute('aria-describedby') applyTransitionDuration([tooltip, circle, circle ? content : null], _duration)