Skip to content
SprecherEast
Issue 635

feat: A shared Caption component with fine print for figures

Back to our plan
Done
enhancementfrontendstylinguxpriority: medium

Problem

In plain words: the note under the I-94 interchange diagram (where the picture comes from, that numbers were added, and the "not final drawings" warning) is shown as ordinary article text. It competes with the article. Pictures, diagrams and charts all need this kind of small credit line, and each one should look the same.

Summary of the owner's request (2026-11-03, Claude voice session on the mobile app, recorded from the call): the small print, or the component where a caption goes, should also be a common component, reusable everywhere as a shared UI element.

Proposed fix

Add one shared Caption to the UI kit (src/platform/ui/):

  • Caption: small, muted text directly under a figure: what it shows and where it came from.
  • Fine print: an optional second line, smaller still (or italic), for conditions and disclaimers, such as "Conditional on a funding agreement with Madison. Not final construction drawings; not to scale."
  • Rendered as figcaption when it sits in a figure, a p otherwise.
  • MediaBlock (src/platform/richtext/MediaBlock.tsx) and ImageCredit use it, so there is one look for every caption, and the one-off mt-6 caption wrapper in MediaBlock goes away.

Native first (checked): the Media collection already has a caption rich-text field, which MediaBlock reads; keep using it, so editors need nothing new for photos. HTML's figure and figcaption are the right elements. Tailwind covers the look. No plugin needed.

Wording guidance for the I-94 diagram (content, done in the content issue): "preferred concept", not "approved plan", because the study names a preferred concept that depends on a funding agreement.

Acceptance criteria

  • Not done: Caption (with optional fine print) exists in the kit, with a test, an axe check, a gallery entry and a row in docs/ui/component-set.md.
  • Not done: MediaBlock and ImageCredit use it; no caption styling is repeated elsewhere.
  • Not done: Muted text meets WCAG AA contrast on the page and card backgrounds, in light and dark.
  • Not done: Readable at 320 px with no sideways scroll.

Area

frontend, styling, ux

Priority

priority: medium


Generated by Claude Code, opens in a new tab

See it on GitHub, opens in a new tab