DataViews: Patterns list: initial focus unexpectedly set on the FilterVisibilityToggle button #67726
Open
2 of 6 tasks
Labels
[Feature] DataViews
Work surrounding upgrading and evolving views in the site editor and beyond
[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
Description
When navigating with the keyboard the menu items in the DataViews navigation panel, focus is supposed to stay on the activated navigation item.
However, in the Patterns list, after navigation, focus goes to the
FilterVisibilityToggle
button. This is unexpected and very confusing for keyboard users.Animated GIF to illustrate:
To my understanding, #67003 introduced a fix to prevent a focus loss when removing the filters.
However, at least for me, the filters in the Patterns list are initially open. As such, focus is moved to the
FilterVisibilityToggle
button when it renders. I'm not sure why the filters are open in the first place. This is the only view where the filters are open by default. Anyways, the fact they are open by default is incompatible with the logic for hte focus introduced in #67003 which moves focus to the button on first render.Cc @ntsekouras
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.
The text was updated successfully, but these errors were encountered: