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

Constrained Tabbing doesn't work reliably with all browsers #45903

Closed
afercia opened this issue Nov 18, 2022 · 2 comments
Closed

Constrained Tabbing doesn't work reliably with all browsers #45903

afercia opened this issue Nov 18, 2022 · 2 comments
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Package] Compose /packages/compose [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 Nov 18, 2022

Description

Likely, this regressed with the component refactoring in #34836

Constrained Tabbing seems to work well with webkit-based browsers. However. it's broken with Firefox. To my understanding, the current implementation relies on the way browsers implement specific behaviors. Specifically, the amount of time browsers take to actually move focus when pressing the Tab key. That may also vary dependiing on a multitude of factors such as the operating system, the hardware, etc. Basically, the implementation relies on something that we don't have under control and as such is less then ideal.

Step-by-step reproduction instructions

  • Use Chrome.
  • Go to the Post editor.
  • Click the Tools button in the top bar.
  • Press the Tab key multiple times to cycle through the two buttons (Edit and Select) within the Tools popover.
  • Observe everything work as expected.
  • Test also with Shift+Tab. Everything work as expected.
  • Keep the Tab key pressed to cycle through the buttons at full speed :) This is to test that there are no timings issue with Chrome. Everything work as expected.
  • Optionally repeat the same test with the Options > Preferences modal.

Repeat the test with Firefox.

  • Observe that at some point, tabbing with the Tab key exits the Tools panel.
  • This happens randomly.
  • To force the failure, keep the Tab key pressed.
  • Repeat the test with the Options > Preferences modal.
  • Also in this case, it may happen randomly. It can be reproduced almost always by pressing Shit + Tab. At tome point, focus will go back to the Options popover.

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 [Package] Compose /packages/compose [a11y] Keyboard & Focus labels Nov 18, 2022
@t-hamano
Copy link
Contributor

A similar problem was reported in #42652, and the PR for this is #42653. I believe this PR will resolve this issue as well.
@ellatrix Could you please re-review #42653 to see if it is appropriate?

@afercia
Copy link
Contributor Author

afercia commented Nov 21, 2022

Thank you @t-hamano
Closing as duplicate of #42652.

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). [Package] Compose /packages/compose [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