Comments: Announce reply notices to screen reader users.

Improve experience for screen reader users by calling `wp.a11y.speak()` with the results of comment reply submissions within the WordPress dashboard.

Props joedolson, khokansardar.
Fixes #61480.

Built from https://develop.svn.wordpress.org/trunk@58931


git-svn-id: http://core.svn.wordpress.org/trunk@58327 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Peter Wilson 2024-08-25 22:37:19 +00:00
parent f51cc56803
commit ac72a65949
4 changed files with 4 additions and 3 deletions

View File

@ -1188,6 +1188,7 @@ window.commentReply = {
if ( er ) {
$errorNotice.removeClass( 'hidden' );
$error.html( er );
wp.a11y.speak( er );
}
},

File diff suppressed because one or more lines are too long

View File

@ -1397,7 +1397,7 @@ function wp_default_scripts( $scripts ) {
$scripts->add( 'admin-tags', "/wp-admin/js/tags$suffix.js", array( 'jquery', 'wp-ajax-response' ), false, 1 );
$scripts->set_translations( 'admin-tags' );
$scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array( 'wp-lists', 'quicktags', 'jquery-query' ), false, 1 );
$scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array( 'wp-lists', 'quicktags', 'jquery-query', 'wp-a11y' ), false, 1 );
$scripts->set_translations( 'admin-comments' );
did_action( 'init' ) && $scripts->localize(
'admin-comments',

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.7-alpha-58930';
$wp_version = '6.7-alpha-58931';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.