From 3f324eed02f24f817e7d75bc7d37c210644a06ee Mon Sep 17 00:00:00 2001 From: Nathan Walters Date: Tue, 5 Jul 2022 22:15:50 -0700 Subject: Handle non-empty whitespace `textContent` in Tooltip trigger (#36588) --- js/src/tooltip.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/src/tooltip.js') diff --git a/js/src/tooltip.js b/js/src/tooltip.js index 650bf2b09..f8d97f240 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -518,7 +518,7 @@ class Tooltip extends BaseComponent { return } - if (!this._element.getAttribute('aria-label') && !this._element.textContent) { + if (!this._element.getAttribute('aria-label') && !this._element.textContent.trim()) { this._element.setAttribute('aria-label', title) } -- cgit v1.2.3