Opened 3 years ago
Closed 3 years ago
#53924 closed defect (bug) (fixed)
Press escape to close Attachment details on media upload page
Reported by: | vondelphia | Owned by: | joedolson |
---|---|---|---|
Milestone: | 5.9 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Media | Keywords: | has-patch commit |
Focuses: | accessibility, javascript | Cc: |
Description
How do we make it so I can press escape to close Attachment details modal / popup on the wordpress media page?
Just visit http://wordpress.test/wp-admin/upload.php and upload a file (in grid mode) and when you left click on it, pressing ESCAPE on keyboard does not close. I can click outside the box and it’ll work though.
p.s. can visit forum topic about it https://wordpress.org/support/topic/press-escape-to-close-attachment-details-on-media-upload-page/
Attachments (2)
Change History (11)
This ticket was mentioned in Slack in #accessibility by ryokuhi. View the logs.
3 years ago
#3
@
3 years ago
- Keywords needs-patch added
- Owner set to joedolson
- Status changed from new to accepted
#5
@
3 years ago
This seems like a pretty important issue; the experience should definitely be the same every time you open the dialog! I'm going to try and get this figured out for 5.9.
#7
@
3 years ago
- Focuses javascript added
Thanks for the patch! With that, I was able to use the Escape key more than once.
We probably should edit the note above that line, too, because it does not remove restricted focus anymore. An earlier version of the script used a different method to keep focus inside the media modal, until r29220.
As noted on the support topic, the Escape key does work the first time you open the details modal dialog, but then pressing the key does not close the dialog when you open it again.
This issue seems familiar, yet I can't find a recent ticket about it (ticket:42180 fixed a different problem with the Escape key).