This commit is contained in:
Hanson.xyz Dev
2026-01-04 17:50:08 -06:00
parent 7e45ce0756
commit acc8ac87a0
4131 changed files with 232562 additions and 250244 deletions
+6 -2
View File
@@ -1303,7 +1303,7 @@ var Button = wp.media.View.extend(/** @lends wp.media.view.Button.prototype */{
this.model = new Backbone.Model( this.defaults );
// If any of the `options` have a key from `defaults`, apply its
// value to the `model` and remove it from the `options object.
// value to the `model` and remove it from the `options` object.
_.each( this.defaults, function( def, key ) {
var value = this.options[ key ];
if ( _.isUndefined( value ) ) {
@@ -9311,8 +9311,11 @@ UploaderStatus = View.extend(/** @lends wp.media.view.UploaderStatus.prototype *
this.views.add( '.upload-errors', statusError, { at: 0 } );
_.delay( function() {
buttonClose.trigger( 'focus' );
wp.a11y.speak( error.get( 'message' ), 'assertive' );
}, 1000 );
_.delay( function() {
wp.a11y.speak( error.get( 'message' ) );
}, 1500 );
},
dismiss: function() {
@@ -9322,6 +9325,7 @@ UploaderStatus = View.extend(/** @lends wp.media.view.UploaderStatus.prototype *
_.invoke( errors, 'remove' );
}
wp.Uploader.errors.reset();
wp.a11y.speak( wp.i18n.__( 'Error dismissed.' ) );
// Move focus to the modal after the dismiss button gets removed from the DOM.
if ( this.controller.modal ) {
this.controller.modal.focusManager.focus();