Preview brand Custom

Callout

A light panel for the one note on a page that mustn't be missed. Each brand gives it its own colours, and it stays light in dark mode on purpose.

Show code
html
<aside class="box-alt">
  <h3>Is your idea ready to prototype?</h3>
  <p>Twelve questions to answer before you spend anything on build.</p>
  <a class="btn-primary" href="/prototype-readiness-check/">Get the checklist</a>
</aside>

When to use it

  • The one note or offer on a page that mustn’t be missed.
  • Something worth making the brightest thing on the screen.

Use something else when:

  • It is about the state of the page (a draft, an error): a notice.
  • There would be two on a screen: pick one.
  • It is the page’s main action alone: a button.

How it works: why it doesn't go dark

In dark mode every other surface darkens. A callout that also darkened would become just another panel. Keeping it light makes it the brightest thing on a dark page, which is exactly what a callout is for. Because the surface is fixed, everything on it uses the callout's own colours: inside a callout, the accent, ink, border and surface variables point at the brand's callout tokens, so buttons, links and anything else placed in it are correct in every brand and theme without overrides. Try the brand switch: each brand has its own callout (Media Dreams cream and ember, Spotlight pale gold, Gulo parchment and ember, Neutral grey).

Tokens

Brands set color.surface.callout, color.border.callout (also the accent inside it) and color.text.on-callout, the same in light and dark. The theme builder generates them from your brand colour.

Where it's used

  • The availability message on the home page
  • The prototype readiness checklist offer
  • The evidence carousel on the home page

Do and don't

Do

  • One callout per screen at most
  • Use color.text.on-callout for text inside it

Don't

  • Hard-code colours inside a callout: let it set them, so it works in every brand
  • Use it for errors; that's the error panel

Accessibility

What it does for you

  • Its own text, edge and accent colours, the same in light and dark, checked against its background when the tokens are built, buttons included.
  • Whatever is put in it takes those colours, so a button or a link inside is right without anyone setting it.
  • It is a look, not a role: the element is the page’s choice.

What you need to do

  • The right element: an <aside> for something beside the page’s point, a plain block for part of it.
  • A heading inside it, at the level the page’s outline needs.
  • One on a screen at most.

Keyboard

KeyWhat it does
TabNothing of its own: only what is put inside it.

What a screen reader is told

  • Whatever the element is: "complementary" for an <aside>; nothing for a plain block.

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

CriterionLevelHow this meets it
1.4.3 Contrast (Minimum)AAText and button words against the callout’s own colours, in light and dark.
1.4.11 Non-text ContrastAAIts edge and its button stand out from the panel.

The criteria this component has a part in. A page that uses it still has to meet the rest.

Checked

CheckHowResult
Automated (axe-core)WCAG 2.0, 2.1 and 2.2 rules at A and AA, the page in light and in darkPassed
Nothing found, light or dark
Narrow screenNo sideways scrolling at 320px wide (WCAG 1.4.10)Passed
No sideways scrolling
Keyboard and what the browser reportsReal key presses on the live example, and the role, name and state given to assistive technologyPassed
4 of 4 checks pass
On paperSomnia’s print check: no overlaps, stranded headings or controls on the pagePassed
No faults on 4 sheets
Screen readerListened to by a person, in VoiceOver and NVDANot yet
Not yet checked by a person

The 4 checks made with the keyboard, on the example at the top of this page:

  • Passed Its words have at least 4.5:1 against the panel, in light and dark
  • Passed A button inside it takes the callout’s own colours, and its words have at least 4.5:1 against its fill
  • Passed It is the same colours in light and in dark
  • Passed Only what is put inside it is a stop for the keyboard

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.
  • On a dark page the callout is by far the brightest thing. Whether that is uncomfortable for people who chose dark for the glare has not been asked.

Evidence

Where it's used

WhereFor
mediadreams.co.ukThe availability message and the evidence carousel on the home page; the checklist offer on Services and Insights.

What we saw, and what changed

WhenWhat we sawWhat changed
The callout’s colours were Media Dreams’ own in every brand, and a button inside needed its own overrides.Each brand sets its callout colours, and inside one the accent, text, border and surface colours re-point (1.4.0).
The build’s contrast check did not look at buttons inside callouts.It does (1.22.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

  • Nothing is known about whether the callout is seen first on a page, which is what it is for.