ADR-0062: Badges and headings¶
Status: Accepted, amended by ADR-0080 (the badge's shape) and ADR-0081 (the nav's count without a pill or its token) Date: 2026-10-21 Deciders: Alex Nodeland
Context¶
The UI audit of 2026-10-20 (lattice RFC-0007) found headings set by hand, page by page: 16 below the page's own, as font-semibold with or without a size, or as a type entry spelled out each time. It also found pills drawn by hand beside StatusBadge: a revision's "Latest", an option's "Recommended", each with its own corners and padding, one with no edge under forced colours. This is polish PR 4 of the audit, after links (ADR-0059), list rows (ADR-0060) and icon buttons (ADR-0061).
Decision¶
Headingtakes alevel(2 to 4, as the outline needs) and alookfrom the kit's type scale:section,subsection(new inTYPE: the base size, semibold, between a section's and a label),labelorlabelQuiet. The level says where a heading sits, the look how much it weighs, so a card's title can be anh3and still read as a label.classNameis for layout alone, such as breaking a long word.SectionTitleisHeadingat level 2, as a section. The page's oneh1staysPageHeader's.- Every heading in ui, app and admin below the page's is a
Headingor aSectionTitle, and Biome refuses a rawh2toh6elsewhere (the page'sh1isPageHeader's, and sign-in's): the 16 written by hand in the trace and log views, the cards and panels, the dashboards' panels, a form's sections, a mini app's chrome, a revision's parts, and the usage page's. Badgeis a word in a pill that says what something is, not how it is going, which staysStatusBadge's. It isneutral(quiet, on the surface) oraccent(the working colour, for the one thing the reader is pointed to). It takes the badge's corners and padding (--badge-radius,--badge-pad-y,--badge-pad-endon both sides), and always has an edge, so a forced-colours reader sees it as a pill. Its pairs are already in the manifest:mutedonsurface, andon-accentonaccent. "Latest" and "Recommended" are badges now.- Not badges, and why: the nav's count is a counter beside a link, on its own token (
--nav-count-radius). A question's answer chip is a truncating label of what was answered, on its own token (--question-chip-radius). Neither says what a thing is.
Consequences¶
- Easier: a kit restyles every heading below the page's through the type scale, and every label pill through the badge's tokens.
- Easier: a raw
h2toh6outside the kit is refused by Biome (noRestrictedElements), so every heading below the page's stays aHeading; Markdown's own headings are on its exception list already. - The style census's heading count, 3, doesn't move: the converted headings that are in its galleries (a stat card's title, a section's title) keep their looks. It was not re-run after the change.
Amendment, 2026-10-30: the nav's count has no token of its own¶
ADR-0081 (#779) set the rail's count as a figure, with no pill: --nav-count-radius was removed from the tokens, the brand inventory and the kits, and is superseded here. The nav's count is still not a badge, for the reason above. A question's answer chip keeps --question-chip-radius.