WordPress.org

Make WordPress Core

Opened 8 months ago

Closed 6 weeks ago

#49459 closed defect (bug) (reported-upstream)

Allow Ctrl+Y redo in post editor

Reported by: slapbox Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.0
Component: Editor Keywords:
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 (14)

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


8 months ago

#2 @afercia
8 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.


6 months ago

#4 follow-up: @afercia
6 months 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
6 months 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
6 months 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 months ago

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


5 months ago

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


5 months ago

#10 @audrasjb
4 months ago

  • Milestone changed from 5.5 to Future Release

Moving to Future release as this won't make it for WP 5.5.

#11 @afercia
6 weeks ago

  • Milestone changed from Future Release to 5.6

#12 @afercia
6 weeks ago

Noting that there's an equivalent issue on the Gutenberg Github repo, see https://github.com/WordPress/gutenberg/issues/8921

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


6 weeks ago

#14 @afercia
6 weeks ago

  • Keywords needs-patch removed
  • Milestone 5.6 deleted
  • Resolution set to reported-upstream
  • Status changed from new to closed

This ticket was discussed during today's accessibility bug-scrub: agreed to close as "reported upstream", see the linked issue in the Gutenberg repository.

Note: See TracTickets for help on using tickets.