mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Remove redundant title attribute from wp_star_rating(). Hide the visible number of ratings from assistive technologies.
This data is redundant, as the same information is already conveyed by the text hidden with `.screen-reader-text` class. Props afercia. Fixes #35141. git-svn-id: https://develop.svn.wordpress.org/trunk@36092 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -572,7 +572,7 @@ function install_plugin_information() {
|
||||
<?php if ( ! empty( $api->rating ) ) { ?>
|
||||
<h3><?php _e( 'Average Rating' ); ?></h3>
|
||||
<?php wp_star_rating( array( 'rating' => $api->rating, 'type' => 'percent', 'number' => $api->num_ratings ) ); ?>
|
||||
<small><?php printf( _n( '(based on %s rating)', '(based on %s ratings)', $api->num_ratings ), number_format_i18n( $api->num_ratings ) ); ?></small>
|
||||
<small aria-hidden="true"><?php printf( _n( '(based on %s rating)', '(based on %s ratings)', $api->num_ratings ), number_format_i18n( $api->num_ratings ) ); ?></small>
|
||||
<?php }
|
||||
|
||||
if ( ! empty( $api->ratings ) && array_sum( (array) $api->ratings ) > 0 ) {
|
||||
|
||||
Reference in New Issue
Block a user