Fixed Incorrect use of aria-label for tooltips

Kirby

Well-known member
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);
}

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.
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.10).

Change log:
Remove superfluous code setting aria-label for tooltips
There may be a delay before changes are rolled out to the XenForo Community.
 
Top Bottom