diff --git a/packages/client/src/directives/tooltip.ts b/packages/client/src/directives/tooltip.ts index 4b495cf66..9dabd0756 100644 --- a/packages/client/src/directives/tooltip.ts +++ b/packages/client/src/directives/tooltip.ts @@ -20,6 +20,12 @@ export default { self.hideTimer = null; self.checkTimer = null; + if (!binding.modifiers.noLabel) { + if (!document.body.contains(el)) return; + if (self.text == null) return; + el.setAttribute("aria-label", self.text); + } + self.close = () => { if (self._close) { window.clearInterval(self.checkTimer);