diff --git a/src/wp-includes/js/media/views/modal.js b/src/wp-includes/js/media/views/modal.js
index f31a59d6d4..a757869bbb 100644
a
|
b
|
Modal = wp.media.View.extend(/** @lends wp.media.view.Modal.prototype */{ |
17 | 17 | tagName: 'div', |
18 | 18 | template: wp.template('media-modal'), |
19 | 19 | |
20 | | attributes: { |
21 | | tabindex: 0 |
22 | | }, |
23 | | |
24 | 20 | events: { |
25 | 21 | 'click .media-modal-backdrop, .media-modal-close': 'escapeHandler', |
26 | 22 | 'keydown': 'keydown' |
… |
… |
Modal = wp.media.View.extend(/** @lends wp.media.view.Modal.prototype */{ |
125 | 121 | } |
126 | 122 | } |
127 | 123 | |
128 | | this.$el.focus(); |
| 124 | this.$el.find('> .media-modal').focus(); |
129 | 125 | |
130 | 126 | return this.propagate('open'); |
131 | 127 | }, |
diff --git a/src/wp-includes/media-template.php b/src/wp-includes/media-template.php
index bd0e31f2a0..ccd02d6d06 100644
a
|
b
|
function wp_print_media_templates() { |
162 | 162 | </script> |
163 | 163 | |
164 | 164 | <script type="text/html" id="tmpl-media-modal"> |
165 | | <div class="<?php echo $class; ?>"> |
| 165 | <div tabindex="0" class="<?php echo $class; ?>"> |
166 | 166 | <button type="button" class="media-modal-close"><span class="media-modal-icon"><span class="screen-reader-text"><?php _e( 'Close media panel' ); ?></span></span></button> |
167 | 167 | <div class="media-modal-content"></div> |
168 | 168 | </div> |