open-ui
open-ui copied to clipboard
[popover] moving keyboard focus out of a popover should dismiss it
Currently, clicking outside a popover dismisses it. However, using the keyboard to tab through links in a popover, and then to the next link outside the popover does not dismiss it. This means that if the next focussable element is 'underneath' the still-exposed popover, it is not visible.
This doesn't fall foul of WCAG SC 2.4.11 because "If the user can reveal the focused component without advancing the keyboard focus, the component with focus is not considered visually hidden due to author-created content.", and esc will light dismiss the popover. However, it feels annoying and inconsistent.
~~Should a popover light-dismiss when keyboard focus leaves it? I think so, if it does when mouse pointer leaves it.~~
Should we create a new declarative way to achieve light dismiss when focus leaves a popover?