diff --git a/js/src/tooltip.js b/js/src/tooltip.js index 936a2a66f2fa4f9ee4342a3b7529c0553f3187c5..a04739b7fe7c42c8ce825d2b0ff01d6f0c9c93ec 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -584,8 +584,8 @@ class Tooltip extends BaseComponent { if (title || originalTitleType !== 'string') { this._element.setAttribute('data-bs-original-title', title || '') - if (!this._element.getAttribute('aria-label') && !this._element.textContent) { - this._element.setAttribute('aria-label', this._element.getAttribute('title') || '') + if (this._element.getAttribute('title') && !this._element.getAttribute('aria-label') && !this._element.textContent) { + this._element.setAttribute('aria-label', this._element.getAttribute('title')) } this._element.setAttribute('title', '')