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

Allow the use of tabs for list indents and outdents #1641

Closed

Conversation

DevinWalker
Copy link
Contributor

@DevinWalker DevinWalker commented Jul 2, 2017

PR Overview

Allow tab to be used to indent list items. As well, allow shift + tab to outdent tabs.

Preview

2017-07-01_17-19-30

Ref: #1552 and #1640

@afercia
Copy link
Contributor

afercia commented Jul 2, 2017

As mentioned in #1552 this would break keyboard navigation through blocks 🚨 Once in a "list" block there's no way to tab away from the block, since the Tab key is used for indentation.

@swissspidy
Copy link
Member

@afercia Unless we fix #1482 first.

@afercia
Copy link
Contributor

afercia commented Jul 2, 2017

Unless we fix #1482 first.

Yep but then it would be unexpected that tabbing works for some blocks and doesn't for some other ones?

@ellatrix
Copy link
Member

ellatrix commented Jul 3, 2017

Worth noting that this breaks in TinyMCE as well. Tab will normally focus the next focusable element, except in lists. Not sure what the solution is here. Could it work only at the start of a list item, and use wp speak to alert the user?

Just tried it in Google Docs and there it also only works at the start of a list item. Everywhere else it inserts an actual tab character.

@afercia
Copy link
Contributor

afercia commented Jul 3, 2017

Yep this always worked this way in TinyMCE too. However, in TinyMCE there are no "blocks" so it is always possible to enter some content after the list (even just a space) and the Tab key switches back to its default action.

@BoardJames
Copy link

We added the lists_indent_on_tab option to TinyMCE specifically to turn it off for the list block to address the usability problem of it being a tab trap. There are now keyboard shortcuts for indenting and outdenting ( ctrl/command + ] for indent and ctrl/command + [ for outdent ).

@BoardJames
Copy link

See #1826

@gziolo
Copy link
Member

gziolo commented Sep 22, 2017

We added the lists_indent_on_tab option to TinyMCE specifically to turn it off for the list block to address the usability problem of it being a tab trap. There are now keyboard shortcuts for indenting and outdenting ( ctrl/command + ] for indent and ctrl/command + [ for outdent ).

It looks like using new keyboard shortcuts is the way to go here. @DevinWalker thanks for spending time on this PR. I'm closing it, but feel free to reopen if you think it's still an issue.

@gziolo gziolo closed this Sep 22, 2017
@afercia
Copy link
Contributor

afercia commented Sep 22, 2017

ctrl/command + ] for indent and ctrl/command + [ for outdent should be tested also on non-English layout keyboards. For example, the Italian keyboard layout:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants