Closed johnwatkins0 closed 2 years ago
PR incoming
Describe the bug
At this line: https://github.com/10up/component-library/blob/develop/packages/tooltips/src/tooltip.js#L52
Because those forEach callbacks run in parallel , this.count will always be 1 at https://github.com/10up/component-library/blob/develop/packages/tooltips/src/tooltip.js#L132
forEach
this.count
1
This results all the generated IDs and aria-describedby values on the page being tool_tip_1
aria-describedby
tool_tip_1
To Reproduce Steps to reproduce the behavior:
new Tooltip('.tooltip');
Expected behavior Each tooltip should have a unique ID.
Screenshots
PR incoming
Describe the bug
At this line: https://github.com/10up/component-library/blob/develop/packages/tooltips/src/tooltip.js#L52
Because those
forEach
callbacks run in parallel ,this.count
will always be1
at https://github.com/10up/component-library/blob/develop/packages/tooltips/src/tooltip.js#L132This results all the generated IDs and
aria-describedby
values on the page beingtool_tip_1
To Reproduce Steps to reproduce the behavior:
new Tooltip('.tooltip');
in your JSExpected behavior Each tooltip should have a unique ID.
Screenshots