ui:bootstrap - backport accessibility update from b0372bb658, closes https://github.com/opnsense/core/pull/7599

This commit is contained in:
Ad Schellevis 2024-07-08 20:28:36 +02:00
parent 5d98f9fde0
commit b0cab3bdca
2 changed files with 5 additions and 3 deletions

View File

@ -1784,7 +1784,10 @@ if (typeof jQuery === 'undefined') {
Tooltip.prototype.fixTitle = function () {
var $e = this.$element
if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {
$e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
if (!$e.attr('aria-label') && !$e.text().trim()) {
$e.attr('aria-label', $e.attr('title'));
}
$e.attr('data-original-title', $e.attr('title') || '').attr('title', '');
}
}

File diff suppressed because one or more lines are too long