Commit adc857f6 authored by Patrick H. Lauke's avatar Patrick H. Lauke Committed by XhmikosR
Browse files

Extra check for existence of any `aria-label`

before overwriting it...
parent b0372bb6
Showing with 2 additions and 2 deletions
+2 -2
...@@ -584,8 +584,8 @@ class Tooltip extends BaseComponent { ...@@ -584,8 +584,8 @@ class Tooltip extends BaseComponent {
if (title || originalTitleType !== 'string') { if (title || originalTitleType !== 'string') {
this._element.setAttribute('data-bs-original-title', title || '') this._element.setAttribute('data-bs-original-title', title || '')
if (!this._element.getAttribute('aria-label') && !this._element.textContent) { 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('aria-label', this._element.getAttribute('title'))
} }
this._element.setAttribute('title', '') this._element.setAttribute('title', '')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment