aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/src/tooltip.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/js/src/tooltip.js b/js/src/tooltip.js
index 797afb134..936a2a66f 100644
--- a/js/src/tooltip.js
+++ b/js/src/tooltip.js
@@ -584,6 +584,10 @@ 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') || '')
+ }
+
this._element.setAttribute('title', '')
}
}