Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#34080 closed defect (bug) (fixed)

Use wp_star_rating() on Add Themes screen

Reported by: sergeybiryukov's profile SergeyBiryukov Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 4.4 Priority: normal
Severity: normal Version:
Component: Themes Keywords: has-patch has-screenshots
Focuses: ui, accessibility, rtl, administration Cc:


Background: #26814

Unlike Add Plugins screen, the Add Themes screen does not use wp_star_rating() and tries to recreate similar markup with JS.

The markup, however, is a bit different, and has a few issues:

  • Does not work for RTL (see the before/after screenshots).
  • Requires a lot of custom CSS styling.
  • Uses different classes and is visually inconsistent with plugin ratings.
  • Does not appear to be accessible.

We should add an echo argument to wp_star_rating() (like we did for wp_terms_checklist() in [33904]) and use the existing function instead.

There is a slight visual change (the "based on %s ratings" string becomes redundant, because wp_star_rating() has a similar text as a title attribute and screen reader text).

Attachments (3)

34080.patch (6.3 KB) - added by SergeyBiryukov 8 years ago.
34080.ltr.png (85.8 KB) - added by SergeyBiryukov 8 years ago.
34080.rtl.png (85.7 KB) - added by SergeyBiryukov 8 years ago.

Download all attachments as: .zip

Change History (8)

#2 @SergeyBiryukov
8 years ago

  • Keywords has-screenshots added

#3 @wonderboymusic
8 years ago

  • Owner set to SergeyBiryukov
  • Status changed from new to assigned

#4 @SergeyBiryukov
8 years ago

In 35005:

Add echo parameter for wp_star_rating().

See #34080.

#5 @SergeyBiryukov
8 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 35006:

Use wp_star_rating() on Add Themes screen:

  • It works correctly for RTL
  • Requires less CSS styling
  • Is visually consistent with plugin ratings
  • Is more accessible

Fixes #34080.

Note: See TracTickets for help on using tickets.