Skip to content
Bugwise
Menu
UI Components

Rating

Star ratings, thumbs and scores. Learn how a rating input should take a value, preview it, work with a keyboard and stay optional or required, how averages are rounded and shown, and how app store prompts behave, then hunt five bugs in a shop's review form.

30–45 min Inputs & selection Web · iOS · Android Also called: Star rating, Rating stars, Review stars, Score, Thumbs up/down, Like

A product shows 4.8 next to four and a half stars. You leave a two-star review, and the label says OK. You press Submit without choosing any stars, and a review with zero stars appears and drags the average down. You come back to edit your review: five stars are already selected.

Ratings look like decoration, but people choose restaurants, apps, hotels and drivers by them, and businesses are ranked by them. A rating that’s shown wrong or saved wrong changes real decisions.

Part Not started

What is it?

A rating component has two very different jobs, often on the same screen:

  • Input: the user gives a score: tap the fourth star, thumbs up, 8 out of 10.
  • Display: the app shows a summary of many scores: 4.6 ★ (1,284 reviews). It’s read-only.
KindTypical useWatch out for
Stars (1–5)Products, apps, restaurants, driversRounding, half stars, labels
Thumbs up / downVideos, help articles (“Was this helpful?”)Undo, switching from up to down, counts
Emoji or facesQuick satisfaction surveys after support or deliveryMeaning must be clear without color
Number scale (0–10)NPSNPSNet Promoter Score: a survey that asks "How likely are you to recommend us?" on a 0–10 scale.Open in glossary → surveys: “How likely are you to recommend us?”0 is a real answer, not “no answer”
Like / heartSocial posts, favoritesThat’s more a toggle than a rating

Anatomy of a star rating

  • Stars, usually five, filled up to the value.
  • An optional label for the hovered or chosen value: Terrible, Poor, OK, Good, Excellent.
  • For a display: the number (4.6), the count (1,284 reviews) and often a breakdown bar per star value.
  • For an input: a way to clear it if the rating is optional, and validation if it’s required.

Check this part

  1. What's the difference between a rating input and a rating display?

  2. On a 0–10 "How likely are you to recommend us?" scale, what is 0?

A rating is either an input (the user gives a score) or a display (an average of many scores); stars are the most common form, alongside thumbs, emoji and number scales.

Part Not started

When to use it

  • Stars when people need to compare many items quickly, and five levels mean something.
  • Thumbs when you only need to know “good or not”: help articles, recommendations.
  • A number scale for surveys with a standard method, like NPS.
  • Not for anything that needs an explanation: a 1-star rating without text helps no one. Pair low ratings with a question (“What went wrong?”).

Asking at the right moment

When to ask matters as much as the component:

  • After the experience is complete: after delivery, not right after ordering.
  • Not in the middle of a task, and not again after the user said no.
  • App store reviews use the system prompt. On iOS and Android the app can request it, but the system decides whether it actually appears and limits how often, so the app must never promise it (“Tap here to rate us!”) or reward ratings.
Dev note

iOS uses SKStoreReviewController / SwiftUI requestReview, which shows at most three times in 365 days per user. Android uses the Play In-App Review API, which has its own quota and may show nothing. In iOS development builds the prompt always appears and submitting does nothing; in TestFlight builds it never appears. On Android it only shows for an app installed from Play, for example through internal app sharing or an internal testing track.

Check this part

  1. A button says "Rate us 5 stars and get 10% off". What's wrong?

  2. The app calls the system review prompt, but nothing appears. Is it a bug?

Use stars for a simple overall score, thumbs for yes-or-no feedback, and ask for ratings at the right moment, especially app store reviews.

Part Not started

How a good rating behaves

As an input

  • Hover preview (mouse only): stars fill as the pointer moves over them, and go back to the saved value when it leaves.
  • Click or tap saves the value. On touch screens there is no hover, so the tap is the only feedback: it must be clear.
  • The label matches the value: 1 Terrible … 5 Excellent, or whatever the spec says.
  • Keyboard: the stars behave like a radio group: Tab reaches them, arrow keys change the value. See keyboard navigationKeyboard navigationUsing a website with only the keyboard: Tab to move, Enter or Space to activate, Esc to close.Open in glossary →.
  • Required or optional: if required, Submit shows an error without a value. If optional, there’s a way to clear it, and “no rating” is saved as no rating, not 0.
  • Editing: your earlier rating is preselected. Changing it updates the average, and doesn’t count you twice.
  • Whole or half stars: inputs usually take whole stars. If half stars are allowed, tapping the left half of a star must be easy on a phone.

As a display

  • The stars and the number agree. 4.8 shown as four and a half stars looks like a different rating. The rounding rule (to the nearest half, or an exact fill) is a spec decision; testers check that it’s applied everywhere the same way.
  • Edge values: no ratings yet (“No reviews yet”, not 0.0 stars), exactly one rating, all 5s, all 1s.
  • The count is right and formatted for the language: 1,284 or 1.284.
  • Updates: after you submit, the average and count change (immediately or after a known delay).

Try it

Input: rate this product

Hover, click, or Tab to the stars and use the arrow keys.

No rating yet

Saved value: none

Display: an average of many ratings

Rounded down to ½ (4.5)
Rounded to nearest ½ (5)
Exact fill (4.8)

Rounding down shows 4.5 stars next to “4.8”. That under-sells the product and disagrees with the number. Which rule is right is a spec question; the stars and the number must agree.

Check this part

  1. The average is 4.8. Which display is a bug, whatever the spec says?

  2. A product has no ratings yet. What should the display show?

An input previews on hover, saves on click or tap, works with arrow keys, can be cleared when optional and is validated when required; a display rounds consistently and agrees with its number.

Part Not started

Common bugs

#BugWhat you seeTypical severitySeverityHow much damage a bug does to the product or the user.Open in glossary →
1Stars and number disagree4.8 next to 4½ stars, or different rounding on the list and the detail pageMedium
2Wrong labels2 stars says “OK”, or labels shifted by oneLow–Medium
3No keyboard supportTab skips the stars; arrows do nothingHigh (accessibility)
4No rating saved as 0Submit works without stars; the average dropsHigh
5Edit loses the old valueEdit opens with 5 stars or none instead of yoursMedium–High
6Counted twiceEditing adds a new review instead of updating yoursHigh
7Hover sticksAfter the pointer leaves, the preview stays and looks savedMedium
8Average not updatedThe count goes up but the average staysMedium
9Empty stateEmpty stateThe screen a user sees when there is no content yet, like an empty cart or no search results.Open in glossary → shows 0.0New products look like the worst productsMedium
10Review prompt at a bad moment“Rate us!” during checkout or after a crashMedium

Bug hunt

This is a shop’s review page for running shoes. Write a review, then try again in other ways:

  • Compare the stars at the top with the number next to them.
  • Hover over each star and read the label.
  • Put the mouse away and use only the keyboard.
  • Submit without choosing any stars.
  • Edit your review.

🐞 Bug hunt: Trail Runner X reviews

This demo has 5 hidden bugs. Explore it like a tester, then check your findings.

Found0/5
shop.test/trail-runner-x/reviews

Trail Runner X · Reviews

4.8(10 reviews)

Write a review

  • Ivana

    Light and comfy on long runs.

  • Luka

    Great grip on wet trails.

  • Sara

    Runs a bit small.

  • Nikola

    Third pair already.

  • Petra

    Perfect.

  1. 1

    Hint: Compare the stars at the top with the number next to them.

  2. 2

    Hint: Hover over each star from 1 to 5 and read the label.

  3. 3

    Hint: Click in the review text, then press Shift+Tab to go back to the stars.

  4. 4

    Hint: Press Submit review without choosing any stars.

  5. 5

    Hint: Submit a 2-star review, then press Edit.

Some things work, and that’s useful to notice too: the hover preview goes back to the saved value when the pointer leaves, and the count and average do update after a normal review.

Check this part

  1. Why is "no rating saved as 0" more serious than it looks?

  2. Edit opens with 5 stars instead of your 2. What's the risk?

Ratings that round wrong, mislabel values, ignore the keyboard, accept no rating as zero or forget the user's earlier score, and a review form to find five of them in.

Part Not started

How to test it

Start without any tools. Find a screen that uses this component and use it the way a real user would: slowly, then fast, then in ways nobody planned for. Tick off the checklist as you go. Most of it needs only your eyes and your fingers.

Then try the example test cases. Some of them need a little setup:

  • A screen reader: VoiceOver on iPhone, TalkBack on Android. Both are in the phone’s Accessibility settings. See Mobile accessibility.
  • A keyboard: on the web, put the mouse away and use Tab, Enter, Space, Esc and the arrow keys.

New to this? Do the checklist first and skip any test case whose setup you don’t know yet.

Checklist

Rating test checklist

0 of 11 checked

Example test cases

TC-RAT-001Each value saves correctly with the right label

Steps

  1. For each value 1 to 5: select it
  2. Read the label
  3. Submit and check the saved review

Expected result

The saved review shows exactly the selected number of stars. Labels: 1 Terrible, 2 Poor, 3 OK, 4 Good, 5 Excellent.

TC-RAT-002Rating with the keyboard only

Steps

  1. Tab to the rating
  2. Press Right arrow three times
  3. Tab to Submit and press Enter

Expected result

Focus is visible on the stars, the value changes with each arrow, a screen reader announces "3 stars, OK" (or similar), and a 3-star review is saved.

TC-RAT-003Submitting without a rating

Steps

  1. Write a review text without choosing stars
  2. Press Submit

Expected result

If required: an error next to the stars, nothing saved. If optional: the review is saved without a rating and the average does not change.

TC-RAT-004Editing keeps and updates the rating

Preconditions

  • The user has a 2-star review

Steps

  1. Press Edit
  2. Check the preselected stars
  3. Change to 4 and save

Expected result

The form opens with 2 stars. After saving, there is still one review from the user, now with 4 stars, and the average reflects 4, not 2 + 4.

TC-RAT-005Average display rounding

Steps

  1. Prepare products with the averages above
  2. Check the list, the detail page and the search results

Test data

Averages 4.24, 4.25, 4.74, 4.75 and 0 ratings

Expected result

Stars follow the spec rule (for example nearest half) and agree with the number on every screen. 0 ratings shows "No reviews yet".

Tip: click a test case to expand it.

A checklist and example test cases: values and labels, keyboard, required and optional, editing, averages and rounding, empty states and review prompts.

Part Not started

Accessibility

Mobile vs web

  • No hover: the tap is the only way to choose, and a drag across the stars should also work if the design suggests it.
  • The App Store review prompt is a system dialog with its own stars. The app’s own rating screens should not look like it.
  • Check VoiceOver: swipe up and down on an adjustable rating, or each star as a button with a value.
  • The classic RatingBar supports drag and half steps; check that the step size matches the spec.
  • The Play In-App Review dialog may not appear at all; the app must continue normally either way.
  • Check TalkBack announces the value and lets users change it.

Check this part

  1. How should a screen reader announce a read-only rating display?

  2. Which pattern fits a star rating input best?

Ratings as named radio groups, read-only displays announced as text, color and size, and how ratings and review prompts work on iOS, Android and the web.

Key takeaways

  • A rating is an input (one user’s score) or a display (a summary of many). Test them differently.
  • Inputs: values and labels match, hover resets, keyboard works, required vs optional is clear, and edit preselects the saved value.
  • “No rating” is not 0. Never let it into the average.
  • Displays: the stars and the number agree, with one rounding rule everywhere, and an honest empty state.
  • Averages and counts update after submit and edit, without counting anyone twice.
  • App store review prompts are requests: the system decides, and rewards are forbidden.

Finished this page?Nice work, this page is complete!

Mark it as done to track your progress. It's saved in this browser, no account needed.

Its cards are now in your Bites review ⚡
Esc

Type to search the whole site.