Skip to content

feat: craft pass — focus, contrast, press feedback, reduced motion - #27

Merged
ajitheee merged 1 commit into
mainfrom
craft-pass
Oct 4, 2026
Merged

ajitheee merged 1 commit into
mainfrom
craft-pass

Conversation

@ajitheee

@ajitheee ajitheee commented Oct 4, 2026

Copy link
Copy Markdown
Owner

The last seven findings from the site audit. None were costing a lead today; all of them read as carelessness to anyone who notices.

Keyboard focus was invisible

Nothing in the site defined a focus style, so Tailwind's preflight reset left outline-style: none on all 38 tabbable elements. A keyboard user had no idea where they were.

One :focus-visible rule now covers the site. The ring colour is a CSS variable, because a green ring on the brand-900 security band would have been the same bug in a different costume — .on-dark flips it to a light tone.

Verified with a real Tab press, not programmatic .focus() (which does not trigger :focus-visible and gave a false negative first time round).

Contrast: 21 failures → 0

Body copy ran at text-brand-800/60 — 3.3:1 against a 4.5:1 requirement — and /50 at 2.6:1.

Rather than pick a value that looked better, I computed the threshold against every surface the text actually sits on:

alpha cream white cream-50 cream-100
60% 3.31 3.41 3.33 3.23
70% 4.25 4.42 4.28 4.11
75% 4.84 5.06 4.88 4.65

75% is the first value clearing 4.5 everywhere. Dark sections move to cream/70 (6.34:1 on brand-900, 5.51:1 on brand-800). 33 replacements.

The +18% spike badge needed its own fix: amber-600 on amber-50 is 3.07:1; amber-800 is 6.84:1.

Measured after: 182 text elements checked, 0 failures.

Press feedback

No button had an :active state. On a phone, tapping "Start Free Trial" gave no acknowledgement until the next page painted. A .press utility now scales to 0.97 on pointer-down across 11 buttons, degrading to an opacity shift under reduced motion.

Reduced motion

35 elements travelled 24px on scroll, and scroll-behavior was globally smooth, with no escape hatch for a motion-sensitive visitor. The reveal now cross-fades without travelling — gentler, not absent. Also handles prefers-reduced-transparency.

Mobile menu

Added a dimming scrim, background scroll lock, Escape-to-close, and aria-expanded/aria-controls. Kept mounted and toggled by class so it animates closed as well as open — previously it slid open and then vanished.

The product is now visible on phones

The invoice demo card was hidden lg:block. Phone visitors never saw the product at all. Verified: no horizontal overflow at 375px (card sits 20–355px in a 375px viewport).

Loading spinner

Orange on slate grey, left over from an older theme — the first thing every visitor saw was the wrong brand. Now green on cream.

🤖 Generated with Claude Code

Seven findings from the site audit, none of which were costing a lead today
but all of which read as carelessness to anyone who notices them.

Focus. Nothing defined a focus style, so Tailwind's preflight left keyboard
users with no visible focus anywhere — outline-style computed to `none` on all
38 tabbable elements. A single :focus-visible rule now covers the site. The
ring colour is a CSS variable because a green ring on the brand-900 security
band would have been the same bug wearing a different hat; .on-dark flips it
to a light tone.

Contrast. Body copy ran at text-brand-800/60 (3.3:1) and /50 (2.6:1) against a
4.5:1 requirement. Rather than guess, the threshold was computed against every
surface the text actually sits on: /75 is the first value that clears 4.5 on
cream, white, cream-50 and cream-100 (worst case 4.65). Dark sections move to
cream/70. 33 replacements. The +18% spike badge needed its own fix — amber-600
on amber-50 is 3.07:1, amber-800 is 6.84:1.

Measured after: 182 text elements checked, 0 failures. Was 21.

Press feedback. No button had an :active state, so a tap on a phone gave no
acknowledgement at all until the next paint. A .press utility now scales to
0.97 on pointer-down, and degrades to an opacity shift under reduced motion.

Reduced motion. 35 elements travelled 24px on scroll and scroll-behavior was
globally smooth, with no escape hatch. The reveal now cross-fades without
travelling — gentler, not absent. Also handles prefers-reduced-transparency.

Mobile menu. Added a dimming scrim, background scroll lock, Escape to close,
and aria-expanded/controls. It is kept mounted and toggled by class so it
animates closed as well as open; it used to vanish instantly.

Mobile product demo. The invoice card was `hidden lg:block`, so phone visitors
never saw the product — the most persuasive element on the page was desktop
only. Verified no horizontal overflow at 375px.

Loading spinner. Was orange on slate, left over from an older theme. The first
thing any visitor saw was the wrong brand.

Co-Authored-By: Claude Opus 5 <[email protected]>
@vercel

vercel Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
chef-code-ai Ready Ready Preview Oct 4, 2026 1:35am UTC

@ajitheee
ajitheee merged commit 7e9033c into main Oct 4, 2026
3 of 4 checks passed

This branch was successfully deployed

1 active deployment
Preview — 2beb5997 Deployed Oct 4, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant