mirror of
https://github.com/Hopiu/bootstrap.git
synced 2026-03-18 21:40:24 +00:00
Extra check for existence of any aria-label
before overwriting it...
This commit is contained in:
parent
b0372bb658
commit
adc857f617
1 changed files with 2 additions and 2 deletions
|
|
@ -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', '')
|
||||
|
|
|
|||
Loading…
Reference in a new issue