You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When editing a post in "post-only" mode and the post title is focused then shift+tab doesn’t allow navigating out of the canvas. This happens in Gutenberg trunk and 6.8 beta1 whereas in 6.7 it doesn’t. In 6.7 it takes two-steps to get out of the canvas and that may not be ideal but at least it’s possible.
The expectation is that the "Options" button is focused when pressing shift+tab from the post title.
Step-by-step reproduction instructions
Open a post in "post-only" view
Move focus into the post title
Press shift+tab repeatedly
Confirm that it’s not possible to navigate out of the canvas
Screenshots, screen recording, code snippet
post-title-no-shift-tab-out-of-canvas.mp4
Environment info
WP 6.7.2 with Gutenberg plugin from trunk or WP 6.8 beta1
Chrome
macOS
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
Please confirm which theme type you used for testing.
I was able to reproduce the issue on a Windows OS. When I launch the NVDA screen reader and run Shift + Tab repeatedly in the post title, the screen reader repeatedly reads the following:
section
Edit Post “Hello world!” ‹ gutenberg — WordPress document
main landmark
Editor content region
Editor canvas frame
document
section
Add title edit multi line Hello world!
Ideally, the focus should move from the post title to the Options button?
Thanks for reporting this issue. It's a keyboard trap that makes the post editor unusable for all keyboard users, not only for screen reader users.
It's not clear to me if ths issue occurs also in the editor version for WordPress 6.8. In that case, it's a blocker and should be fixed for the release.
Yes, what’s curious about that is it restored an early return that had apparently not been causing this issue when it was there before. So what allowed shift+tab to work before? I tried figuring that out and gave up without success.
Noting that we restored the early return to fix #69037 (reasoning here: #69037 (comment)) and there are other ways we can fix that, I think we can remove it. I’ve put that (plus a little extra) in #69520.
Activity
t-hamano commentedon Mar 7, 2025
I was able to reproduce the issue on a Windows OS. When I launch the NVDA screen reader and run Shift + Tab repeatedly in the post title, the screen reader repeatedly reads the following:
Ideally, the focus should move from the post title to the Options button?
stokesman commentedon Mar 8, 2025
I think so. That’s where focus lands in 6.7 and it matches the the visual order.
afercia commentedon Mar 10, 2025
Thanks for reporting this issue. It's a keyboard trap that makes the post editor unusable for all keyboard users, not only for screen reader users.
It's not clear to me if ths issue occurs also in the editor version for WordPress 6.8. In that case, it's a blocker and should be fixed for the release.
t-hamano commentedon Mar 10, 2025
I identified this issue as occurring in #69079. That is, this early return:
gutenberg/packages/block-editor/src/components/writing-flow/use-tab-nav.js
Lines 128 to 130 in 66394c4
This is because the post title has no
clientId.t-hamano commentedon Mar 10, 2025
We can solve this by checking if the current element is a post title, but I don't think hardcoding the CSS class names is ideal:
stokesman commentedon Mar 10, 2025
Yes, what’s curious about that is it restored an early return that had apparently not been causing this issue when it was there before. So what allowed shift+tab to work before? I tried figuring that out and gave up without success.
Noting that we restored the early return to fix #69037 (reasoning here: #69037 (comment)) and there are other ways we can fix that, I think we can remove it. I’ve put that (plus a little extra) in #69520.