mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Accessibility: improve the Star Ratings hiding empty elements for assistive technologies.
Fixes #36725. git-svn-id: https://develop.svn.wordpress.org/trunk@37330 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
7ad11aaad8
commit
ee30b90714
@ -2071,9 +2071,9 @@ function wp_star_rating( $args = array() ) {
|
||||
|
||||
$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 );
|
||||
$output .= str_repeat( '<div class="star star-empty"></div>', $empty_stars );
|
||||
$output .= str_repeat( '<div class="star star-full" aria-hidden="true"></div>', $full_stars );
|
||||
$output .= str_repeat( '<div class="star star-half" aria-hidden="true"></div>', $half_stars );
|
||||
$output .= str_repeat( '<div class="star star-empty" aria-hidden="true"></div>', $empty_stars );
|
||||
$output .= '</div>';
|
||||
|
||||
if ( $r['echo'] ) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user