Part of #6.
Both failures are amber tokens carrying non-text meaning, declared four lines apart in the same :root block, and neither one is a styling judgement call: one is a WCAG 2.2 conformance failure and the other makes a bento cell and two icon chips render as nothing at all. The rest of the palette measures fine, so this is two token references and one decision about borders, not a restyle.
What is there today
resources/views/index.stx#L147is the only focus style on the page:outline: 2px solid var(--accent); outline-offset: 3pxona:focus-visibleandsummary:focus-visible.--accentis#f59e0batresources/views/index.stx#L116, and the dark block atresources/views/index.stx#L120-L129does not redefine it, so the ring is the same amber in both themes.--paperis#fafaf9atindex.stx#L111and#0c0c0eatindex.stx#L122.#f59e0bon#fafaf9is 2.06:1. WCAG 2.2 SC 1.4.11 sets a 3:1 floor for a focus indicator against the adjacent background. The same amber on#0c0c0eis 9.10:1, so dark mode already passes and light mode is the only failure.outline-offset: 3pxputs the ring in a gap that shows--paper, so even on the amber pill CTAs the ring is amber on paper, not amber on amber. The button fill does not help it.- Everything focusable is affected in light mode: the two nav links and the nav CTA at
index.stx#L181-L183, the hero CTA atindex.stx#L198, the download CTA atindex.stx#L322, the two footer links atindex.stx#L376, and all six FAQ summaries, rendered by thesummaryatindex.stx#L362from thefaqsarray atindex.stx#L59-L84. resources/views/404.stx#L27carries the identical declaration over identical tokens at404.stx#L20-L21, so the not-found page fails the same way and will not be fixed by a change toindex.stx.--accent-washis#fffbebatindex.stx#L118and#1c1508atindex.stx#L128, applied by.u-washatindex.stx#L138. Against--paperthat is 1.01:1 in light mode and 1.08:1 in dark, which is below the point where a fill reads as a surface at all.- The bento cell at
index.stx#L291isp-6 rounded-2xl u-reveal u-washwith no border, while its two neighbours atindex.stx#L285andindex.stx#L303arep-6 border rounded-2xl u-line u-raised. So the cell reads as loose text on the page background in both themes while the cards around it read as cards, and the grid atindex.stx#L267is left with one photo, two cards and a gap. - The chips at
index.stx#L250andindex.stx#L304aresize-11 rounded-full u-washwrapping a single glyph, so the circle never appears and only the amber icon shows. - The rest of the palette needs no change and should not be touched:
--mutedis 7.40:1 light and 7.63:1 dark,--accent-inkas a text colour is 4.81:1 light and 11.71:1 dark, and#18181bon#f59e0bin.u-btn-primaryatindex.stx#L143is 8.25:1.
Proposal
- In
resources/views/index.stx#L147, change the outline colour fromvar(--accent)tovar(--accent-ink). No theme-specific rule is needed, because--accent-inkis already redefined per theme:#b45309atindex.stx#L117is 4.81:1 on light paper and#fbbf24atindex.stx#L127is 11.71:1 on dark paper, so both themes clear the 3:1 floor with a one token change. - Apply the same one token change to
resources/views/404.stx#L27. That file defines--accent-inkin both themes at404.stx#L20-L21, so nothing new has to be added to it. - Make the wash read as a surface. Pick one of two routes. Either deepen
--accent-washatindex.stx#L118andindex.stx#L128until it separates from--paperby roughly 1.2:1 or more in both themes, or leave the token alone and give the cell atindex.stx#L291and the chips atindex.stx#L250andindex.stx#L304the sameborder u-linethe rest of the system uses. - Leave
--accent,--muted,--accent-inkand.u-btn-primaryas they are.
Requirements
- Do not change
--accentto fix the ring. It is the primary button fill atindex.stx#L143, and darkening it enough to reach 3:1 as a ring would pull the#18181bbutton label down from 8.25:1 and shift the accent on every other surface that uses it. - Keep the fix in one declaration. Prefer swapping the token reference in the single rule at
index.stx#L147over adding a seconda:focus-visibleblock inside the dark media query. If the exact#f59e0bhue is wanted for the dark ring specifically, introduce a--focustoken defined in both blocks rather than duplicating the rule. - The ring has to contrast with
--paper, not with the element. Because ofoutline-offset: 3px, the adjacent colour is the page background on both sides of the ring, including on the three amber CTAs. - Fix the wash one way, not both. Deepening the token and adding borders each solve it, and doing both makes the cell at
index.stx#L291visibly heavier than its neighbours. - Whichever wash route is chosen, the chips are part of it.
index.stx#L250andindex.stx#L304use the same token for a 44px circle, so a border added only to the bento cell leaves the step icons bare. resources/views/404.stxneeds its own edit. Its tokens and its focus rule are a separate inline block and do not inherit anything fromindex.stx.
Acceptance
- Tabbing through
/in light mode shows a focus ring measuring at least 3:1 against#fafaf9on the nav links and nav CTA, the hero CTA, the download CTA, both footer links and all six FAQ summaries. The same check on/404. - Dark mode still measures at least 3:1 on the same elements, on both pages.
- The bento cell at
index.stx#L291reads as a distinct card besideindex.stx#L285andindex.stx#L303in both light and dark mode, whether by surface or by border. - The circles behind the icons at
index.stx#L250andindex.stx#L304are visible in both themes. --accent,--muted,.u-btn-primaryand every text colour are byte for byte unchanged, and./buddy lintpasses.