Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Components: focus is lost from Modal on keyboard operation in Firefox #42652

Closed
t-hamano opened this issue Jul 23, 2022 · 1 comment · Fixed by #42653
Closed

Components: focus is lost from Modal on keyboard operation in Firefox #42652

t-hamano opened this issue Jul 23, 2022 · 1 comment · Fixed by #42653
Assignees
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release

Comments

@t-hamano
Copy link
Contributor

t-hamano commented Jul 23, 2022

Description

In the Firefox browser, the focus sometimes goes out of the modal f you use the TAB key to move.
This issue is very unstable and seems to occur when the machine is under load or when tabs are moved at high speed.

Step-by-step reproduction instructions

  • Open one of the modal window from the Storybook page or "Welcome Guide" of the post editor, etc.
  • Press tab key or tab + shift key to change the focus in the modal window.
  • Alternatively, hold down tab key to change the focus to fast.
  • Sometimes you should see the focus goes out of the modal.

Screenshots, screen recording, code snippet

On Post Editor

welcome-guide.mp4

On Storybook

storybook.mp4

Environment info

  • WordPress Version: 6.1-alpha-53579
  • Gutenberg Version: 13.7.2 (with or without)
  • Browser Version: Firevox 102.0.1 (64bit)

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@t-hamano t-hamano added the [Package] Components /packages/components label Jul 23, 2022
@t-hamano t-hamano changed the title Components: focus is lost from Modal on keyboard operation in Firefox. Components: focus is lost from Modal on keyboard operation in Firefox Jul 23, 2022
@t-hamano t-hamano added the Browser Issues Issues or PRs that are related to browser specific problems label Jul 23, 2022
@t-hamano t-hamano self-assigned this Aug 18, 2022
@afercia afercia added [Type] Bug An existing feature does not function as intended [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Type] Regression Related to a regression in the latest release [a11y] Keyboard & Focus and removed Browser Issues Issues or PRs that are related to browser specific problems [Package] Components /packages/components labels Nov 21, 2022
@afercia
Copy link
Contributor

afercia commented Nov 21, 2022

See also the reproduction instructions on #45903, closed as duplicate of this issue.

I'd like to highlight that this isn't a browser bug. The current implementation is just relying on the fact that a native browser behavior occurs with some timing that isn't predictable. As such, the change implemented in #34836 seems very fragile to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants