Reviews
An overall score and where it comes from, then the reviews themselves as cards, with the reviewer's name lined up at the foot of each.
What our clients say
4.7 3 Google reviews
-
An example review, to show the layout: a few sentences in the reviewer’s own words.
Sample A.September 2026 · Example -
Real reviews are copied word for word from the business’s own profile.
Sample B.August 2026 · Example -
Names, dates and stars come from the review too.
Sample C.July 2026
See the web page for 1 more review.
What our clients say
4.7 3 Google reviews
-
An example review, to show the layout: a few sentences in the reviewer’s own words.
Sample A.September 2026 · Example -
Real reviews are copied word for word from the business’s own profile.
Sample B.August 2026 · Example -
Names, dates and stars come from the review too.
Sample C.July 2026
See the web page for 1 more review.
Show code
// somnia.config.mjs, or the same fields in src/content/settings/reviews.yaml (edited in Somnia CMS)
reviews: {
source: 'Google', url: 'https://…', rating: 4.9, count: 27,
items: [{ name: 'Sarah M.', date: '2026-04-12', rating: 5, trip: 'Family charter', text: '…' }],
},
// a page: the first two, the rest behind "Show all 3 reviews"
<Reviews limit={2} more /> When to use it
- The business has reviews on a public site (Google, Trustpilot) with a score.
- People can follow a link and read them all there.
Use something else when:
- The words are ones the business kept itself (thank-you notes, a guest book): Testimonials.
- There is one line of praise to quote in passing: a quotation in the text.
How it works
Reviews live in the site's config (reviews), so every page that shows them agrees. limit shows the first few, for a home page. url links to the full list on the review site.
Example reviews
While a site is being made it can show made-up reviews to try the layout: set example: true. They then appear on staging only, under a notice saying they're examples, and never on the live site. Replace them with real reviews, word for word, before setting example: false. note: false leaves the notice off where the whole page is already known to be a preview. The notice never prints.
Details
- Stars use
color.rating.star; the score is also given in words for screen readers. - Cards fill their row and the name sits at the foot, so names line up across a row.
- Kept out of site search (
data-pagefind-ignore), so search finds each page for its own words. moreputs the reviews pastlimitbehind a "Show all" button (stepshows a few at a time);clampcuts long ones to a few lines with Read more. On paper: the reviews on screen, and a line saying how many more the web page has.
Do and don't
Do
- Copy reviews exactly, with the reviewer's permission where the platform asks for it
- Link to the source so visitors can check
Don't
- Publish made-up or edited reviews as real
- Pick only the five-star ones if the overall score says otherwise
Accessibility
What it does for you
- A region named by its heading, then the score, then the reviews as a list, so a screen reader says how many there are.
- Stars are one image with a name in words ("4 out of 5 stars"), never five separate pictures. A review nobody rated has none.
- Each review is a figure: the quotation, then who wrote it and when.
- "Show all" says whether the rest are showing. Pressing it puts the focus on the first review it shows, since they come before the button.
- The score’s source is in words beside it, and linked when the site gives the address.
What you need to do
- Reviews copied exactly, with their real stars and dates.
- A heading that says whose words these are.
- The address of the full list, so anyone can check.
Keyboard
| Key | What it does |
|---|---|
| Tab | Moves to the link to the source, any Read more, then Show all. |
| Enter or Space | On Show all: shows the rest and moves to the first of them. On Show fewer: hides them again. |
What a screen reader is told
- A region with the heading’s name; the score as "4.7 out of 5 stars"; a list of however many reviews.
- Each review: a figure named by who wrote it and when, holding a quotation.
- The button: "Show all 3 reviews", collapsed; "Show fewer reviews", expanded.
This is what the browser reports to assistive technology. What each screen reader then says varies, and has not been listened to yet.
WCAG 2.2
| Criterion | Level | How this meets it |
|---|---|---|
| 1.1.1 Non-text Content | A | The stars have a name in words. |
| 1.3.1 Info and Relationships | A | A list of figures, each a quotation with its caption. |
| 1.4.1 Use of Color | A | The score is a number as well as stars. |
| 2.4.3 Focus Order | A | Focus goes to the first review that Show all brings in. |
| 2.5.8 Target Size (Minimum) | AA | The button is 52px high. |
| 4.1.2 Name, Role, Value | A | The button says whether the rest are showing. |
The criteria this component has a part in. A page that uses it still has to meet the rest.
Checked
| Check | How | Result |
|---|---|---|
| Automated (axe-core) | WCAG 2.0, 2.1 and 2.2 rules at A and AA, the page in light and in dark | Passed Nothing found, light or dark |
| Narrow screen | No sideways scrolling at 320px wide (WCAG 1.4.10) | Passed No sideways scrolling |
| Keyboard and what the browser reports | Real key presses on the live example, and the role, name and state given to assistive technology | Passed 7 of 7 checks pass |
| On paper | Somnia’s print check: no overlaps, stranded headings or controls on the page | Passed No faults on 6 sheets |
| Screen reader | Listened to by a person, in VoiceOver and NVDA | Not yet Not yet checked by a person |
The 7 checks made with the keyboard, on the example at the top of this page:
- Passed It is a region named by its heading, holding a list with one item for each review showing
- Passed The score and each review’s stars are one image each, named in words
- Passed Each review is a figure holding a quotation, named by who wrote it and when
- Passed Show all is a button that says the rest are hidden
- Passed Enter on it shows the rest, says so, and puts the focus on the first review it showed
- Passed Tab then reaches Show fewer, which hides them again and keeps the focus
- Passed The button is at least 44px high
Run by script on against Somnia DS 1.89.0, in Chromium with axe-core 4.14.0. How these checks work, and every component's results.
Not yet checked
- How it sounds in a screen reader (VoiceOver, NVDA, TalkBack) has not been checked by a person. The roles, names and states the browser reports are checked by script; what is actually spoken is not.
- Windows high contrast (forced colours) has not been looked at by a person.
- The stars’ colour against the card has not been measured in every brand. The score is always there in figures and words, so nothing depends on it.
Evidence
Where it's used
| Where | For |
|---|---|
| Headland Yachting | Each yacht’s own reviews on its page. Its Google reviews on the home page and About are switched off for now. |
What we saw, and what changed
| When | What we saw | What changed |
|---|---|---|
| Headland’s reviews were to come off its pages for now, and be kept. | A Show on the site switch that keeps them in the file (1.44.0). | |
| Closing a long list with Show fewer left the reader far down the page. | Closing takes the reader back to the start of what closed (1.49.1). | |
| A review with no rating was drawn, and averaged, as five stars. | Stars are shown only for a rating someone gave (1.77.0). | |
| Show all brought the rest in above the button and left the keyboard on the button, past them. | The first of them takes the focus, as it already did when they were shown a few at a time (1.85.0). |
From building and using it on real sites, each entry taken from the changelog or the build's own notes. This is observation by the studio and its clients, not research sessions with users.
What we don't know yet
- How many people open the rest, or follow the link to the source, is not counted.