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

Tab unexpectedly highlights "Add block" instead of indenting unordered list #4181

Closed
danielbachhuber opened this issue Dec 27, 2017 · 15 comments
Labels
[Block] List Affects the List Block [Package] Keycodes /packages/keycodes

Comments

@danielbachhuber
Copy link
Member

As a Gutenberg user, I'd expect that using the tab button within an existing unordered list would increase the indent level.

Here's the behavior in the existing editor:

list-classic

In Gutenberg, the same keystroke pattern triggers the "Add block" UI instead of indenting the list:

list-gutenberg

This is Firefox Quantum 57.0.1 on Mac.

@youknowriad
Copy link
Contributor

I'm missing some context here but I recall this being discussed and we decided to avoid it for accessibility reasons (Avoid tab trap). Maybe @jasmussen and @afercia could tell us more.

@afercia
Copy link
Contributor

afercia commented Dec 27, 2017

See for example #1621

The difference with the classic editor is that a list is always within TinyMCE, so users can always press Enter - Backspace or "exit" the list by other means and have the Tab key back to its default behavior.
Instead, implementing indentation via Tab in a Gutenberg List block would actually trigger a "keyboard trap", resulting in the inability to tab away from the List block. A keyboard shortcut for indentation would be handy, but I'd recommend to not use Tab.

@youknowriad
Copy link
Contributor

Closing as "won't fix" for now

@danielbachhuber
Copy link
Member Author

using the tab button within an existing unordered list would increase the indent level.

Worth noting that this is the behavior for both Dropbox Paper and Google Docs too.

@danielbachhuber
Copy link
Member Author

Also:

Instead, implementing indentation via Tab in a Gutenberg List block would actually trigger a "keyboard trap", resulting in the inability to tab away from the List block.

This seems like an implementation detail, not a refutation of the expected user experience.

@youknowriad
Copy link
Contributor

Also, one could argue that there's a tap trap in the current editor as well. Since you could have meta boxes and stuff like that after TinyMCE.

@danielbachhuber
Copy link
Member Author

Certainly. I don't expect there to be an immediate decision on this; rather, I think it's best we surface all of these little details for deliberate consideration before they're imposed upon tens of thousands of users who have existing usage patterns.

@youknowriad
Copy link
Contributor

I'm fine reopening if this is something we want to rediscuss/reconsider? cc @afercia

@jasmussen
Copy link
Contributor

Question, can enter/backspace not exit the list here? If not then that might be the issue to fix perhaps?

@afercia
Copy link
Contributor

afercia commented Dec 28, 2017

and Google Docs too

Actually, on Google Docs, the recommended shortcut is Cmd/Ctrl + [ or ]. Yes, it works with Tab too but in a Google Doc it is easily possible to "exit" a list with arrows or Enter and avoid to be trapped.

This seems like an implementation detail, not a refutation of the expected user experience.

The "expected user experience" when pressing Tab is the default behavior 🙂 moving focus to the next focusable element. Gutenberg lives withing a Web application, it is not a "full editor" like Google Docs. In this case, the default behavior of Tab should not be altered.

@danielbachhuber
Copy link
Member Author

The "expected user experience" when pressing Tab is the default behavior 🙂 moving focus to the next focusable element. Gutenberg lives withing a Web application, it is not a "full editor" like Google Docs.

We can agree to disagree then. In this case, I think the current user experience is the expected user experience.

@getsource
Copy link
Member

Ran into this again today. It's pretty frustrating to not be able to indent lists with tab.

@jasmussen
Copy link
Contributor

Agree, it feels totally wrong to not be able to indent lists with tab.

Are there any other ways to ensure accessibility that allows us to keep the default list creation behavior?

@afercia
Copy link
Contributor

afercia commented May 28, 2018

I'd just like to remind everyone this is not Word or a similar desktop application. Gutenberg (and WordPress itself) is a Web application. On the web, Tab just navigates through focusable fields. That's a native behavior that shouldn't be broken. I can only recommend (as previously said) an alternate shortcut. Worth also reminding a great part of the users will just click the indent / outdent buttons.

@afercia
Copy link
Contributor

afercia commented May 31, 2018

I've created #7051 as follow-up to this issue. /Cc @getsource

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] List Affects the List Block [Package] Keycodes /packages/keycodes
Projects
None yet
Development

No branches or pull requests

6 participants