openui / openui/open-ui

[popover] moving keyboard focus out of a popover should dismiss it

Open
#1,047 10 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs-triage popover
Dominant language
MDX
Stars
4.5k
Forks
226
Avg merge
2d 22h
Merged PRs (30d)
4

Description

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?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the issue discussion and the existing statements about pointer dismissal, keyboard focus, WCAG SC 2.4.11, and Esc dismissal. Done means reaching a settled decision on whether focus leaving a popover should dismiss it and, if so, defining the proposed declarative behavior.

Written by the indexing model from the issue text.

Assessment

Domain
accessibility, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.