Make WordPress Core

Ticket #28852: 28852.patch

File 28852.patch, 742 bytes (added by joedolson, 11 years ago)

Screen reader text for star ratings.

  • wp-admin/includes/template.php

     
    21352135                $title = sprintf( __( '%s rating' ), number_format_i18n( $rating, 1 ) );
    21362136        }
    21372137
    2138         echo '<div class="star-rating" title="' . esc_attr( $title ) . '">';
     2138        echo '<div class="star-rating" title="' . esc_attr( $title ) . '"><span class="screen-reader-text">' . esc_attr( $title ) . '</span>';
    21392139        echo str_repeat( '<div class="star star-full"></div>', $full_stars );
    21402140        echo str_repeat( '<div class="star star-half"></div>', $half_stars );
    21412141        echo str_repeat( '<div class="star star-empty"></div>', $empty_stars);