- Affected version
- 2.2.9
When initializing a tooltip, the JS does set
aria-label
on the element which often isn't valid:
Code:
if (
!$target.attr('aria-label')
&& !$target.attr('aria-labelledby')
&& !$.trim($target[0].textContent).length
)
{
$target.attr('aria-label', title);
}
aria-label - Accessibility | MDN
The aria-label attribute defines a string value that can be used to name an element, as long as the element's role does not prohibit naming.
developer.mozilla.org
Not all elements can be given an accessible name. Neither aria-label nor aria-labelledby should be used with non-interactive elements or inline structural role such as with code, term, or emphasis nor roles whose semantics will not be mapped to the accessibility API, including presentation, none, and hidden. The aria-label attribute is intended for interactive elements only. Use aria-label to ensure an accessible name is provided when none is visible in the DOM for all interactive elements, like links, videos, form controls, landmark roles, and widget roles.