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/template.php

    r35903 r36092  
    99 */
    1010
    11 /** Walker_Category_Checklist class */ 
     11/** Walker_Category_Checklist class */
    1212require_once( ABSPATH . 'wp-admin/includes/class-walker-category-checklist.php' );
    1313
    14 /** WP_Internal_Pointers class */ 
     14/** WP_Internal_Pointers class */
    1515require_once( ABSPATH . 'wp-admin/includes/class-wp-internal-pointers.php' );
    1616
     
    20552055    }
    20562056
    2057     $output = '<div class="star-rating" title="' . esc_attr( $title ) . '">';
     2057    $output = '<div class="star-rating">';
    20582058    $output .= '<span class="screen-reader-text">' . $title . '</span>';
    20592059    $output .= str_repeat( '<div class="star star-full"></div>', $full_stars );
Note: See TracChangeset for help on using the changeset viewer.