mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Accessibility: Improve the Comments and Privacy count text.
- standardizes the Comment count string to `%s Comment in moderation', '%s Comments in moderation` so it can be bulk-updated - adds the string as visually hidden text in the admin menu - introduces an `updateInModerationText` JS simple function, responsible to correctly update all the related text using the data from the AJAX response - adds a visually hidden text "1 Privacy Policy update" to the Privacy menu items count - adds/improves translators comments Changes that apply to all the count bubbles (Updates, plugins, etc.) - makes the bubbles and their text slightly bigger - improves the active menu item bubble contrast by changing the background color to red (option 2 in the screenshot attached in a previous comment) Props adamsoucie, afercia. Fixes #33030. git-svn-id: https://develop.svn.wordpress.org/trunk@44924 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -291,9 +291,7 @@ function wp_dashboard_right_now() {
|
||||
<?php
|
||||
$moderated_comments_count_i18n = number_format_i18n( $num_comm->moderated );
|
||||
/* translators: %s: number of comments in moderation */
|
||||
$text = sprintf( _nx( '%s in moderation', '%s in moderation', $num_comm->moderated, 'comments' ), $moderated_comments_count_i18n );
|
||||
/* translators: %s: number of comments in moderation */
|
||||
$aria_label = sprintf( _nx( '%s comment in moderation', '%s comments in moderation', $num_comm->moderated, 'comments' ), $moderated_comments_count_i18n );
|
||||
$text = sprintf( _n( '%s Comment in moderation', '%s Comments in moderation', $num_comm->moderated ), $moderated_comments_count_i18n );
|
||||
?>
|
||||
<li class="comment-mod-count
|
||||
<?php
|
||||
@@ -301,7 +299,7 @@ function wp_dashboard_right_now() {
|
||||
echo ' hidden';
|
||||
}
|
||||
?>
|
||||
"><a href="edit-comments.php?comment_status=moderated" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php echo $text; ?></a></li>
|
||||
"><a href="edit-comments.php?comment_status=moderated" class="comments-in-moderation-text"><?php echo $text; ?></a></li>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user