Use close watcher when supported in place of escape key handlers
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 99.1k
- Forks
- 32.5k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 106
Description
Duplicates
- I have searched the existing issues
Latest version
- I have tested the latest version
Summary 💡
This library should use the CloseWatcher API [1][2] in place of escape key listeners where it's supported. This allows components such as dialog to be dismissed using extra close signals (e.g. Android back gesture).
[1] https://html.spec.whatwg.org/multipage/interaction.html#the-closewatcher-interface
[2] https://developer.chrome.com/blog/new-in-chrome-120#close-watcher
Examples 🌈
No response
Motivation 🔦
The native html dialog (when modal) and popovers have this behaviour in supported browsers (Chromium), using the close watcher API would align with the platform.
It also provides increased accessibility as on top of the back gesture/ button the Talkback back gesture (and potentially other screen readers) also triggers a close watcher.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named; start by locating the library's escape-key listeners for dialog and popover components, then read the linked CloseWatcher specification. Done means supported browsers use CloseWatcher for the relevant close signals while existing dismissal behavior remains aligned with native dialog and popover behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- accessibility, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100