WordPress.org

Make WordPress Core


Ignore:
Timestamp:
12/26/2015 12:47:35 AM (4 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/plugin-install.php

    r35958 r36092  
    573573        <h3><?php _e( 'Average Rating' ); ?></h3>
    574574        <?php wp_star_rating( array( 'rating' => $api->rating, 'type' => 'percent', 'number' => $api->num_ratings ) ); ?>
    575         <small><?php printf( _n( '(based on %s rating)', '(based on %s ratings)', $api->num_ratings ), number_format_i18n( $api->num_ratings ) ); ?></small>
     575        <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>
    576576        <?php }
    577577
Note: See TracChangeset for help on using the changeset viewer.