WordPress.org

Make WordPress Core

Opened 3 months ago

Last modified 9 days ago

#49459 new defect (bug)

Allow Ctrl+Y redo in post editor

Reported by: slapbox Owned by:
Milestone: 5.5 Priority: normal
Severity: normal Version: 5.0
Component: Editor Keywords: needs-patch
Focuses: accessibility Cc:

Description

Not being able to use Ctrl+Y in the post editor by default goes against the default undo/redo hotkeys for the 85% of desktop users who are not using macOS. Both Ctrl+Y and Ctrl+Shift+Z should redo.

Change History (9)

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


3 months ago

#2 @afercia
3 months ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 5.5
  • Severity changed from minor to normal
  • Type changed from enhancement to defect (bug)
  • Version set to 5.0

This ticket was discussed during today's accessibility bug-scrub. Given Ctrl + Y worked on Classic Editor and it doesn’t on Gutenberg, this sounds like an a11y regression and a lack of feature parity with the previous editing experience.

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


7 weeks ago

#4 follow-up: @afercia
7 weeks ago

Looks like the related code of the block editor hardcodes shortcuts for only one platform (macOS). Instead, these shortcuts should dynamically change based on the operating system to match the users expectations.

		registerShortcut( {
			name: 'core/editor/undo',
			category: 'global',
			description: __( 'Undo your last changes.' ),
			keyCombination: {
				modifier: 'primary',
				character: 'z',
			},
		} );

		registerShortcut( {
			name: 'core/editor/redo',
			category: 'global',
			description: __( 'Redo your last undo.' ),
			keyCombination: {
				modifier: 'primaryShift',
				character: 'z',
			},
		} );

#5 in reply to: ↑ 4 ; follow-up: @slapbox
7 weeks ago

@afercia is there any harm to allowing Ctrl+Y and Ctrl+Shift+Z both to operate independent of platform? I'm not sure if there are additional difficulties in mapping multiple shortcuts to the action.

#6 in reply to: ↑ 5 @afercia
7 weeks ago

Replying to slapbox:

@afercia is there any harm to allowing Ctrl+Y and Ctrl+Shift+Z both to operate independent of platform?

From an accessibility perspective, I'd tend to think there won't be any harm unless the non-standard shortcut is expected to do something else on that specific software on that specific platform :(
For example:

  • The Atom editor on macOS uses both Cmd+Y and Cmd+Shift+Z. The "non standard" Cmd+Y isn't reserved for other actions in the context of the Atom Editor.
  • When it comes to browsers, things are different.
  • For example on macOS Chrome, Cmd+Y is expected to open the full history. If we want to use it for "Undo", then we should prevent the default action. But then, I guess the "Show Full History" shortcut would be broken.

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


6 weeks ago

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


2 weeks ago

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


9 days ago

Note: See TracTickets for help on using tickets.