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

Navigation page: create consistent experience to navigate to the toolbar #25296

Closed
afercia opened this issue Sep 14, 2020 · 6 comments
Closed
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs Design Feedback Needs general design feedback. [Type] Bug An existing feature does not function as intended

Comments

@afercia
Copy link
Contributor

afercia commented Sep 14, 2020

Describe the bug
Splitting this out from the Navigation page redesign issue #25178

it should be possible to Shift+Tab from the block to its toolbar (just like in the post editor)

I'd definitely second this. There should be better affordance across all the new UIs and wherever there's a toolbar, one single Shift+Tab should take from the edited object to its toolbar.

For example, right now when I select part of a menu item because I want to make it bold:

  • the first Shift+Tab brings me to the focusable list item that wraps the contenteditable
  • the second Shift+Tab brings me to the "Save" button
  • the third Shift+Tab brings me to the "Block inspector" button, which technically isn't part of the toolbar
  • finally, the fourth Shift+Tab brings me to the real toolbar, where arrows navigation and roving tabindex work as expected

This doesn't help keyboard users and assistive technology users in trusting the user interface, as they would expect the same mechanism that's in use in the block editor.

1
If the Block Inspector button doesn't logically belongs to the toolbar, it shouldn't be visually placed at the right of the toolbar as from a visual perspective this communicates it's part of the toolbar (while technically, it isn't). It should be moved to another place where it's not a tab stop between the menu being edited and the toolbar.

2
If it is considered as something that does logically belong to the toolbar, then it should be placed within the real ARIA toolbar, that is the element with role=toolbar (this would remove one tab stop)

3
More ore less, same applies to the "Save" button: right now it's a tab stop between the menu being edited and its toolbar. It shouldn't be placed there.

4
As per the <li> focusable element that wraps the menu items, I'm not sure why it is necessary in the first place. For example, paragraph blocks don't have a wrapping focusable element. Is there a technical reason for this focusable <li>? It is a tab stop between the menu being edited and its toolbar which introduces a difference in the expected behavior compared to the block editor.

Editor version (please complete the following information):

  • WordPress version: 5.6 trunk
  • Does the website has Gutenberg plugin installed, or is it using the block editor that comes by default? plugin
  • If the Gutenberg plugin is installed, which version is it? 9.0.0-rc.1
@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). [a11y] Keyboard & Focus labels Sep 14, 2020
@afercia afercia added this to the WordPress 5.6 milestone Sep 14, 2020
@tellthemachines tellthemachines added this to Inbox in Navigation editor via automation Sep 14, 2020
@tellthemachines
Copy link
Contributor

tellthemachines commented Sep 15, 2020

Tested and can reproduce. Also found a couple related issues:

  • When Shift+Tabbing into the toolbar from a Link block, by default focus goes to the Select parent button, which is hidden (it shouldn't be focusable at all but hiding it with display:none causes the whole toolbar to be skipped in the focus order). And when the invisible Select parent button is focused, the whole Navigation block is outlined, which is quite confusing:

Navigation block with visible focus outline

  • After deleting a block, and with focus on another block, the Shift+Tab sequence sometimes skips the toolbar altogether. (I was able to reproduce this pretty consistently on top-level menu items, but not when deleting items inside submenus.)

@tellthemachines
Copy link
Contributor

The behaviour of Shift+Tab moving focus to the rightmost element in the top area (in this case the Save button) is the same as in the post editor when "Top toolbar" is enabled. Should we change it there too? Ideally we would use the same approach in both places.

@tellthemachines tellthemachines self-assigned this Sep 15, 2020
@tellthemachines tellthemachines moved this from Inbox to Issues in progress in Navigation editor Sep 15, 2020
@afercia
Copy link
Contributor Author

afercia commented Sep 15, 2020

Not sure what to do with top toolbar. I'd tend to think Shift+Tab should reliably move focus to the toolbar of the object being edited only when they're rendered close each other in the DOM.

The other way to jump to the toolbar is by pressing Alt+F10 (legacy shortcut that worked on Classic Editor) and that works also with top toolbar. Thoughts?

@tellthemachines tellthemachines removed this from the WordPress 5.6 milestone Sep 16, 2020
@tellthemachines tellthemachines removed their assignment Jan 22, 2021
@tellthemachines tellthemachines moved this from Issues in progress to Design in Navigation editor Jan 22, 2021
@tellthemachines tellthemachines added the Needs Design Feedback Needs general design feedback. label Jan 22, 2021
@tellthemachines
Copy link
Contributor

Not quite sure how to move forward with this one, so requesting some design feedback. Cc @shaunandrews

@shaunandrews
Copy link
Contributor

I think this has been resolved with #28675

@tellthemachines
Copy link
Contributor

Yeah this is good to close now.

Navigation editor automation moved this from Design to Done Feb 11, 2021
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). Needs Design Feedback Needs general design feedback. [Type] Bug An existing feature does not function as intended
Projects
No open projects
Development

No branches or pull requests

3 participants