Make WordPress Core

Opened 4 years ago

Closed 4 months ago

#42334 closed enhancement (wontfix)

Enter/Escape keys don't have an affect in the locked content modal

Reported by: johnbillion Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Editor Keywords: needs-patch has-ux-feedback
Focuses: accessibility, javascript, administration Cc:


When a post is locked due to being edited by another user, the Enter and Escape keys don't have any effect on the modal window which pops up.

I think the Enter key should trigger the Take over button, as it's the primary action, and Escape should trigger the All Posts button, as it's the action most similar to cancelling your intention.


Change History (13)

This ticket was mentioned in Slack in #design by boemedia. View the logs.

3 years ago

#2 @Travel_girl
3 years ago

  • Focuses accessibility added

#3 @joyously
3 years ago

This sounds good.

Would it affect anything if it's not locked?

So these keys would only affect the modal window?

#4 @boemedia
3 years ago

Agreed this would benefit both accessibility and usability if expected behaviour is added. Good point @joyously is making - we need to check if the keystrokes do not affect anything when unlocked.

#5 @boemedia
3 years ago

  • Keywords has-ux-feedback added; ux-feedback removed

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

3 years ago

#7 @afercia
3 years ago

  • Milestone changed from Awaiting Review to 5.0

#8 @pento
3 years ago

  • Milestone changed from 5.0 to 5.1

#9 @afercia
3 years ago

This modal is a bit different from all the other modal dialogs, as it can't be dismissed and instead requires to choose an action. In all the other modals, Escape dismiss the modal. I'm not sure making Escape trigger navigation back to All Post would be the expected interaction.

I'm not sure why users at this point would want to preview the post, so I'd just remove the "Preview" button.

So if the available actions are only two, I'd tend to think Enter should not trigger the Take over button: that would be unexpected, I can't think of a place in WordPress where Enter triggers the primary button.

Also, I'm not sure "All Posts" is appropriate, as it's not so clear it will navigate back to the Posts overview. I'd rather simplify the logic and always use the text Go back.

From an accessibility perspective, the lack of an ARIA role="dialog" and a visible title are way more important issues.

#10 @priyankabehera155
3 years ago

Hi @johnbillion and @joyously

I have checked this enhancement in latest WordPress 5.0.2. Though the enter key is not triggering the "Take Over" button but using tab and enter is working to press any button.

#11 @pento
3 years ago

  • Milestone changed from 5.1 to Future Release

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

4 months ago

#13 @joedolson
4 months ago

  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Agree that this modal, since it contains a required decision, needs some special handling. Using standard keyboard escape could be confusing, since its behavior wouldn't be the expected behavior, and would redirect to a new page.

The use of 'Enter' to control just one of a set of buttons in a modal sounds like an accident waiting to happen. With only three controls present, navigating through this modal by keyboard is a minimal challenge, and it's better to avoid that possibility.

Closing; as always, can be reopened for further discussion.

Note: See TracTickets for help on using tickets.