Constrained tabbing: more failures with Safari and Firefox #46041
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
Description
Related: #46038 and #45809
See also #42653
Migrating the
a11y
tests to Playwright #46038 surfaced more failures of Constrained tabbing, specifically with Safari and Firefox. Actually, in #46038 one test fails with Webkit and two tests fail with Firefox. These can be reproduced also manually.Step-by-step reproduction instructions
To manually reproduce the failing tests in the Draft PR #46038
Safari:
This happens only when clicking somewhere after the Close button.
Firefox:
overflow: auto
focusable.Focus stays on the scrollable div. The Close button is not reachable by pressing the Tab key.Edit: can't reproduce this part any longer.Expected: focus to go to the Close button and then cycle through the two elements at following Tab key presses.Firefox is the only browser that natively makes scrollable div elements focusable. I'm not sure this has been ever taken into account. However, the current implementation of Constrained tabbing relies on native browsers behaviors which are actually different. It seems to me the current implementation is inherently fragile as it is exposed to different, legitimate, browsers features. I'm not sure what is the best option here:
Either ways, the scrollable div issue would need to be solved by standardizing the behavor. There are good accessibility reasons to make a scrollable div always focusable, see #45809.
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
The text was updated successfully, but these errors were encountered: