Site Editor: Edit view initial focus: tab sequence should start from the document root #51570
Labels
[Focus] Accessibility (a11y)
Changes that impact accessibility and need corresponding review (e.g. markup changes).
[Package] Edit Site
/packages/edit-site
[Type] Bug
An existing feature does not function as intended
Description
In the Site editor, when switching from the 'view' mode to the 'edit' mode, initial focus is still on the editor canvas iframe. At this point, pressing the Tab key starts the tab sequence from the first block in the editor.
I'm not sure this is a good experience for keyboard users. The Tab sequence should start from the document root, as that's the most expected behavior.
Worth noting that in WordPress 6.1, before the introduction of the 'view' mode, initial focus was programmatically set on the 'Toggle navigation' site icon button.
Step-by-step reproduction instructions
Screenshot:
Test dumping the activeElement to the console:
document.activeElement
in the console.document.activeElement.click()
in the console.document.activeElement
in the console.However, at this point new sections of the UI are rendered around the iframe e.g.: the top bar, the sidebar... as such:
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: