Seeking Assistance with a Specific Scenario
I have a specific layout where a div is enclosing an image. The desired functionality is that when the div is clicked with a mouse, a small tooltip modal should appear displaying address information. This can be visualized as a map with clickable numbers that reveal addresses.
To ensure the same interaction is possible with keyboard navigation, I have set the tabindex="0" attribute for the div.
While I am able to navigate to the div using keyboard inputs, I encounter an issue where pressing enter or spacebar does not trigger the display of the tooltip modal.
Even the keydown events seem to be ineffective in this case. I am seeking assistance in identifying the root cause of this issue. Providing an example would greatly aid in understanding the problem better.