WordPress.org

Make WordPress Core

Opened 6 weeks ago

Last modified 4 weeks ago

#54100 new enhancement

Hotkeys for Headings

Reported by: immwac Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Editor Keywords:
Focuses: ui, accessibility Cc:

Description

Converting Para to heading or anything else take too much time
We need hotkeys for every common functions

Change History (3)

#1 @sabernhardt
6 weeks ago

  • Component changed from General to Editor
  • Keywords needs-refresh removed
  • Severity changed from major to normal
  • Version trunk deleted

Welcome to Trac!

The block editor does not have all the same shortcuts as the classic editor, but you can use at least the heading, list and quote shortcuts with blocks.

For example, '## ' (two hash symbols and a space) at the beginning of a paragraph block converts it to a heading block with H2 level.

The classic editor, however, does not seem to honor these shortcuts every time.
(WordPress 5.8.1, Classic Editor 1.6.2, Firefox 92.0, Windows 10 Home 20H2)

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


5 weeks ago

#3 @ryokuhi
4 weeks ago

Hello @immwac,
we reviewed this ticket during last week's Accessibility Team's bug scrub.
Since you're talking about converting paragraphs to headings, I assume you're using the Block Editor (Gutenberg).

  • As pointed out by @ sabernhardt, you can use a number of hash symbols (#) equal to the heading level you want, followed by a space: you can use this option to create a new heading block from scratches or even add it at the beginning of an existing paragraph block to convert it. E.g. ###  creates an h3 element.
  • Also, you can create a new heading block by typing /hn (where n is the heading level you want to have), followed by the Enter or Return key. E.g. typing /h3 creates a level 3 heading block.
  • In case you're using the Classic Editor instead (based on TinyMCE), you can press Alt + Shift + n (where n is the number key corresponding to the heading level you want to have). E.g. Alt + Shift + 3 creates an h3 element.

It's my opinion that the existing shortcuts are more than enough, at least for converting paragraphs into headings.
Also, while hotkeys are a nice addition as they can speed up work, having too many of them will probably make it easier to confuse them: I think that adding another shortcut might be more harmful than beneficial.

If you still think that the existing shortcuts are not enough or you think that other shortcuts should be added, feel free to add your suggestions here, specifying which key combination should be pressed to convert a specific block into another.

Note: See TracTickets for help on using tickets.