Automattic / Automattic/jetpack
EventBrite Block: Focus not returning to invoking element on modal close (A11Y)
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
In testing the accessibility of this block, I found this issue where - on modal close, the focus isn't returned to the invoking element. Thus keyboard-only users will have a hard time navigating this.
#### Steps to reproduce the issue
1. Add an Eventbrite Checkout block to a post or page and set the "Embed Type" to "Button & Modal".
2. View post/page.
3. Click on the "Register" button to open the modal.
3. Click the "close" button or the escape key.
4. See that the button is not focused.
#### What I expected
Modal-invoking element has `:focus`.

#### What happened instead
Modal-invoking element does not have `:focus`.

Contributor guide
Research direction
Start by locating the Eventbrite Checkout block's Button & Modal implementation and reproduce the focus behavior described in the issue. Trace the close-button and Escape-key paths, then verify that closing the modal returns focus to the invoking Register button for keyboard users.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- accessibility, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100