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

Escape key does not return focus from the block toolbar to the block any longer #50594

Closed
afercia opened this issue May 12, 2023 · 2 comments
Closed
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

@afercia
Copy link
Contributor

afercia commented May 12, 2023

Description

One of the fundamental keyboard interaction affordances the Editor used to provide is that pressing the Escape key on the block toolbar moves focus back to the block content.

This doesn't seem to work any longer. I guess since the introduction of the iframe for the editor canvas. (not sure it's because of the iframe)

This is a serious regression and breaks one of the most established, expected, keyboard interaction patterns in the Editor.

Step-by-step reproduction instructions

In the animated GIF below:

  • Edit a post, enter a title and add a couple paragraphs.
  • Select some text in the first paragraph.
  • Press Shift+Tab.
  • The block toolbar appears.
  • Initial focus is on the Block switcher button.
  • Press Enter: the Block switcher menu opens.
  • Press the Escape key.
  • The Block switcher menu closes. So far, so good.
  • Press the Escape key again.
  • Expected: The block toolbar to disappear and focus to be moved back to the block content.
  • Actual: The block toolbar disappears but focus is not moved back to the block content. Not sure where focus lands, probably a full focus loss occurs.
  • Press the Down arrow key.
  • Focus goes to the Post title.
  • Expected: focus to go to the second paragraph.
  • Reopen the block toolbar and close it again with the Escape key.
  • Press Tab.
  • Focus goes to the Post title.
  • Expected; focus to go to the settings sidebar.

toolbar focus

Screenshots, screen recording, code snippet

No response

Environment info

No response

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

@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 labels May 12, 2023
@Mamaduka
Copy link
Member

Is this the same issue as #45767? I was investigating the latter last week, so the issue seemed familiar.

@afercia
Copy link
Contributor Author

afercia commented May 18, 2023

Same issue. I forgot I already created that one 🤦

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

No branches or pull requests

3 participants