Chapter 08

Accessibility

Inkwell is quiet, and quiet can be hard to read. This chapter reports the real contrast of its colours, including the pairs that fall short, and the rules that keep the rest usable.

Built with

  • WCAG 2 contrast
  • prefers-reduced-motion
  • Focus

Numbers, not adjectives

Measured contrast.

Every ratio below is computed when the site is built, from the colours in globals.css. Nothing is typed by hand, so the table cannot say a pair passes after someone changes a colour.

The yardsticks are WCAG 2: 4.5:1 for body text (level AA), 7:1 for the stricter AAA, and 3:1 for large text and interface parts such as icons and borders.

Text on surfaceUsed forLightDark
foreground on backgroundBody text on the page14.34:1AAA15.85:1AAA
foreground on background-elevatedText inside cards13.95:1AAA14.92:1AAA
foreground on background-surfaceText in inset wells12.60:1AAA13.90:1AAA
foreground-muted on backgroundSupporting copy6.60:1AA8.66:1AAA
foreground-muted on background-elevatedSupporting copy in cards6.42:1AA8.15:1AAA
foreground-subtle on backgroundLabels and metadata4.54:1AA4.69:1AA
foreground-subtle on background-elevatedLabels and metadata in cards4.42:1Large text and UI only4.41:1Large text and UI only
primary on backgroundLinks, focus rings, violet text3.83:1Large text and UI only7.44:1AAA
primary on background-elevatedViolet text in cards3.73:1Large text and UI only7.00:1AAA
accent-warm on backgroundThe accent spark2.53:1Below 3:112.03:1AAA
success on backgroundSuccess messages4.17:1Large text and UI only7.12:1AAA
error on backgroundError messages4.94:1AA5.69:1AA
background on primaryText on a violet button3.83:1Large text and UI only7.44:1AAA

Honest findings

Where it falls short.

5 of the 12 pairs above do not reach 4.5:1 in at least one theme. They are marked in the table. Most are accents or secondary text rather than body copy. The one to watch is the subtle grey used for small labels: it sits right at the line, and small labels count as small text. Each gap has a rule below, but they are real, and a design system that hid them would not be worth trusting.

  • foreground-subtle on background-elevated

    Labels and metadata in cards. Light 4.42:1, dark 4.41:1.

  • primary on background

    Links, focus rings, violet text. Light 3.83:1, dark 7.44:1.

  • primary on background-elevated

    Violet text in cards. Light 3.73:1, dark 7.00:1.

  • accent-warm on background

    The accent spark. Light 2.53:1, dark 12.03:1.

  • success on background

    Success messages. Light 4.17:1, dark 7.12:1.

What to do about them: keep violet text to headings, links and interface parts in the light theme, never small body copy. Treat accent-warm as decoration, never as the only carrier of meaning. Do not pair success green with small text without an icon or a word beside it. Changing a token to fix a pair is a design decision, so it belongs in globals.css, then in this table.

Hands and thumbs

Touch and phones.

On touch screens the learn guides give every control at least 2.5rem (40px) of height, and a short chip gets extra padding, because a chip that looks fine is often hard to hit. Text inputs are 16px on phones, because anything smaller makes iOS zoom the page when the box is focused. And a phone never scrolls sideways: code wraps, tables become stacked labelled cards, and tab rows wrap onto more lines.

globals.css: the touch rule for the guides
@media (pointer: coarse), (max-width: 640px) {  .pega-app main :is(button, summary, select, [role='tab'], [role='radio']):not(.sr-only) {    min-height: 2.5rem;  }}

Movement and the keyboard

Motion and focus.

Entrances and the doodle animations have a prefers-reduced-motion fallback in globals.css. A person who asks their device for less motion gets the end state with no travel.

The guide search dialog is the reference for keyboard behaviour. Ctrl or Cmd plus K opens it, and so does / when you are not typing in a field. It is marked as a modal dialog, arrow keys move through the results, Enter opens one, Escape closes it, Tab stays inside it, and focus returns to the control that opened it.

For every new thing

Rules to follow.

  1. Check any new text and surface pair against the table before you ship it. Aim for 4.5:1 for body text.
  2. Never carry meaning by colour alone. Add a word or an icon.
  3. Give anything that loops or travels a reduced-motion fallback.
  4. Make controls at least 40px tall on touch, and inputs at least 16px.
  5. A dialog traps focus, closes on Escape and returns focus when it closes.
  6. Never let a phone scroll sideways.