Make WordPress Core

Opened 5 years ago

Closed 4 years ago

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

Allow Ctrl+Y redo in post editor

Reported by: slapbox's profile 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.


5 years ago

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


5 years ago

#4 follow-up: @afercia
5 years 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
5 years 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
5 years 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.


5 years ago

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


5 years ago

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


5 years ago

#10 @audrasjb
5 years 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
4 years ago

  • Milestone changed from Future Release to 5.6

#12 @afercia
4 years 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.


4 years ago

#14 @afercia
4 years 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.