Make WordPress Core

Opened 4 years ago

Last modified 2 years ago

#42334 new enhancement

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

Reported by: johnbillion Owned by:
Milestone: Future Release 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 (11)

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
2 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
2 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
2 years ago

  • Milestone changed from 5.1 to Future Release
Note: See TracTickets for help on using tickets.