diff -r 7b1b88e27a20 -r 48c4eec2b7e6 wp/wp-includes/js/wp-ajax-response.js
--- a/wp/wp-includes/js/wp-ajax-response.js Thu Sep 29 08:06:27 2022 +0200
+++ b/wp/wp-includes/js/wp-ajax-response.js Fri Sep 05 18:40:08 2025 +0200
@@ -53,19 +53,27 @@
parsed.responses.push( response );
} );
if ( err.length ) {
- re.html( '
' + err + '
' );
+ re.html( '' + err + '
' );
wp.a11y.speak( err );
} else if ( noticeMessage.length ) {
- re.html( '');
+ re.html( '');
jQuery(document).trigger( 'wp-updates-notice-added' );
wp.a11y.speak( noticeMessage );
}
return parsed;
}
- if ( isNaN(x) ) { return !re.html(''); }
- x = parseInt(x,10);
- if ( -1 === x ) { return !re.html(''); }
- else if ( 0 === x ) { return !re.html(''); }
+ if ( isNaN( x ) ) {
+ wp.a11y.speak( x );
+ return ! re.html( '' );
+ }
+ x = parseInt( x, 10 );
+ if ( -1 === x ) {
+ wp.a11y.speak( wpAjax.noPerm );
+ return ! re.html( '' );
+ } else if ( 0 === x ) {
+ wp.a11y.speak( wpAjax.broken );
+ return ! re.html( '' );
+ }
return true;
},
invalidateForm: function ( selector ) {