WordPress.org

Make WordPress Core

Opened 9 months ago

Closed 8 months ago

Last modified 7 months ago

#51089 closed enhancement (reported-upstream)

Classic Editor Shortcut Support in Block Editor to switch b/w <p> & headings

Reported by: onemoreprince Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.5
Component: Editor Keywords:
Focuses: accessibility Cc:

Description

The earlier default editor (classic editor) has a very useful feature, which allowed to easily change the line of text (technically paragraph) to any Heading (1-6) & vice versa using Control + Option + (1-7)

Currently, it is possible in Block Editor but only inside the classic block. It would be nice to have the same Shortcuts in Block.

It's a major feature many WordPress users would be missing who have used the Classic Editor.

Change History (5)

#1 @SergeyBiryukov
9 months ago

  • Component changed from Formatting to Editor

#2 @afercia
8 months ago

Here's the complete list of related keyboard shortcuts (on macOS) in the Classic Editor:

  • control option 1 --> <h1> heading
  • control option 2 --> <h2> heading
  • control option 3 --> <h3> heading
  • control option 4 --> <h4> heading
  • control option 5 --> <h5> heading
  • control option 6 --> <h6> heading
  • control option 7 --> paragraph element via autop
  • control option 8 --> <div> element
  • control option 9 --> <address> element

The last two ones are little known, but they do work.

Regarding screen readers, worth reminding all the keyboard shortcuts that use control + option as modifier don't work with VoiceOver on masOS, as they conflict with native VoiceOver shortcuts. See #39271.

The conflict issue is also reported on the Gutenberg repository, see https://github.com/WordPress/gutenberg/issues/11154 and the related https://github.com/WordPress/gutenberg/issues/3218 which is the only way to solve conflicts.

This ticket was mentioned in Slack in #accessibility by afercia. View the logs.


8 months ago

#4 @sabernhardt
8 months ago

  • Resolution set to reported-upstream
  • Status changed from new to closed

@onemoreprince Thanks for the report!

This issue covers adding the shortcuts with numbers:
https://github.com/WordPress/gutenberg/issues/11173

As noted on that issue, the markdown-style shortcut with hashes currently works:

  • Typing ## (two hashes) plus a space at the beginning of a paragraph block converts it to a heading block with h2 level
  • Similarly, typing 3-6 hashes plus a space creates lower-level heading blocks.
  • For level 1, you could use the hash to create switch the block type at a lower level and then adjust the level.

Please feel free to continue the discussion on GitHub.

#5 @desrosj
7 months ago

  • Milestone Awaiting Review deleted
  • Severity changed from major to normal
Note: See TracTickets for help on using tickets.