mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +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:
@@ -8,10 +8,10 @@
|
||||
* @subpackage Administration
|
||||
*/
|
||||
|
||||
/** Walker_Category_Checklist class */
|
||||
/** Walker_Category_Checklist class */
|
||||
require_once( ABSPATH . 'wp-admin/includes/class-walker-category-checklist.php' );
|
||||
|
||||
/** WP_Internal_Pointers class */
|
||||
/** WP_Internal_Pointers class */
|
||||
require_once( ABSPATH . 'wp-admin/includes/class-wp-internal-pointers.php' );
|
||||
|
||||
//
|
||||
@@ -2054,7 +2054,7 @@ function wp_star_rating( $args = array() ) {
|
||||
$title = sprintf( __( '%s rating' ), number_format_i18n( $rating, 1 ) );
|
||||
}
|
||||
|
||||
$output = '<div class="star-rating" title="' . esc_attr( $title ) . '">';
|
||||
$output = '<div class="star-rating">';
|
||||
$output .= '<span class="screen-reader-text">' . $title . '</span>';
|
||||
$output .= str_repeat( '<div class="star star-full"></div>', $full_stars );
|
||||
$output .= str_repeat( '<div class="star star-half"></div>', $half_stars );
|
||||
|
||||
Reference in New Issue
Block a user