[wp-trac] [WordPress Trac] #42180: Escape key does not work on Attachment Detail popup when navigating fast

WordPress Trac noreply at wordpress.org
Wed Oct 11 17:33:06 UTC 2017


#42180: Escape key does not work on Attachment Detail popup when navigating fast
------------------------------+-----------------------------------------
 Reporter:  subrataemfluence  |       Owner:  adamsilverstein
     Type:  defect (bug)      |      Status:  assigned
 Priority:  normal            |   Milestone:  Awaiting Review
Component:  Media             |     Version:  4.8.2
 Severity:  normal            |  Resolution:
 Keywords:                    |     Focuses:  javascript, administration
------------------------------+-----------------------------------------

Comment (by afercia):

 > however it is possible we shouldn't be doing anything with focus here

 @adamsilverstein yep, I'd tend to think that when the first or last item
 is reached, focus shouldn't be moved to `this.$el`, if I'm not wrong
 that's `.edit-attachment-frame` and doesn't seem to be focusable to me.

 However, the button gets disabled so in some browsers a focus loss would
 happen. Not sure if disabled buttons are focusable when explicitly setting
 a `tabindex="-1"`. If so, keeping focus on the disabled button seems the
 more appropriate thing to do. I'd give it a try.

 Otherwise, what about _not_ disabling the button but just `noop` it,
 making it look like disabled but without any `disabled` attribute` and
 keep focus on it?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42180#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list