Describe the bug
The tooltip documentation states:
Any element with the class name usa-tooltip and a title attribute will become a tooltip.
This doesn't appear to be correct. The tooltip component appears to only target button elements.
// Initialize tooltip if it hasn't already
if (elementType === "BUTTON" && trigger.hasAttribute("title")) {
setUpAttributes(trigger);
}
Steps to reproduce the bug
- Attempt to apply tooltip component to any element other than
button
Expected Behavior
Based on the documentation, one would expect the tooltip component to apply to "any element with the class name usa-tooltip and a title attribute."
Related code
// Initialize tooltip if it hasn't already
if (elementType === "BUTTON" && trigger.hasAttribute("title")) {
setUpAttributes(trigger);
}
Screenshots
No response
System setup
No response
Additional context
No response
Code of Conduct
Describe the bug
The tooltip documentation states:
This doesn't appear to be correct. The tooltip component appears to only target
buttonelements.Steps to reproduce the bug
buttonExpected Behavior
Based on the documentation, one would expect the tooltip component to apply to "any element with the class name
usa-tooltipand atitleattribute."Related code
Screenshots
No response
System setup
No response
Additional context
No response
Code of Conduct