Created by: nwalters512
If a Tooltip trigger has non-empty textContent
that consists solely of whitespace, Bootstrap will remove the title
but won't add an aria-label
with the contents of title
. Here's a reproduction of this: https://jsfiddle.net/nwalters512/7y8edzxr/7/. This is a poor experience for folks using screen readers, as they won't have any accessible label for the trigger.
This PR changes the JS to check the falseyness of textContent.trim()
instead of textContent
directly.