4 ms·
For compatibility with the Web content, the `click` event has become a device-independent activation event. Sites can't be expected to listen for events from ev
by pornel 2y ago
For compatibility with the Web content, the `click` event has become a device-independent activation event. Sites can't be expected to listen for events from every kind of device, so instead all devices send `click`s.
They care, because focus for keyboard-controlled screen readers sending "click" should behave differently: an element inside the menu should receive focus, even though it's not the element that has been clicked. Otherwise if focus stayed on top-level menu bar, screen reader users would be lost, and had to navigate to menu's content themselves.
- marcellus23 2y agoInteresting. Seems like something that should be exposed more explicitly.