Skip to content

UX audit fixes: CSP hash validity, Check error state, a11y contrast, i18n, copy#43

Merged
MartinMontero merged 5 commits into
mainfrom
claude/wcjbt-credential-health-check-64ymr3
Jul 3, 2026
Merged

UX audit fixes: CSP hash validity, Check error state, a11y contrast, i18n, copy#43
MartinMontero merged 5 commits into
mainfrom
claude/wcjbt-credential-health-check-64ymr3

Conversation

@MartinMontero

Copy link
Copy Markdown
Owner

What does this PR do?

Implements six findings from a UX audit of the live site (Astro/Starlight + the client-side islands), triangulating the browser against the source. Each fix is one commit. Verified against the repo's own gates and a localhost walkthrough (Chromium couldn't reach the deployed domain through this environment's egress proxy, so the walkthrough ran against wrangler dev).

Commit Finding Severity Fix
1cd4d46 F1 CSP hashes emitted bare (sha256-…) → "invalid source" High (latent) Quote at the producer (hashInlineScript) so each hash is a valid CSP source; would otherwise block inline scripts the moment CSP_MODE=enforce flips on
2225183 F2 malformed package.json reported as "✓ all clean" Medium Add dependencyInputError() (additive) + a distinct error/empty state in PolicyChecker
0033ee8 F3 Model Compass metadata labels below WCAG AA Medium (serious) Drop opacity:0.8 on .mc__meta dt — axe color-contrast 89 → 0 (light + dark)
0033ee8 F7 islands re-rendered the page title/intro as a duplicate <h2> Low Remove the duplicate heading/lead from Model Compass + Cost Estimator (keep functional note + aria-label)
01da939 F4 English "Try one" chips + English /build/ H1 on es/ar Medium Localize EXAMPLES per locale; translate the two page titles to match the sidebar
8b4716b F5 stale homepage catalog count + narrow Check copy Low Align to the catalog page's phrasing; mention the dependency-list input

Decisions confirmed by the owner: F4 — translate the es/ar "Build Studio" H1 to match the sidebar; F5 — use a number that matches the catalog page.

Verification: npm run check 0 errors · typecheck:worker clean · npm test 250/250 · npm run build 6652 pages · F3 re-confirmed via axe on /build/models/ in both themes · F2/F4/F7 confirmed live on localhost.

Constraints: CLAUDE.md honored — no new runtime inference, no Meta/OpenAI/xAI deps, Cloudflare-native, operational_advisory + gates untouched. parseDependencyInput and its existing tests are unchanged (F2 is purely additive).

Type of change

  • New catalog entry
  • Fix/update to an existing entry
  • New or updated recipe
  • Build flow / docs
  • Enforcement engine / tooling
  • Other — UX / a11y / i18n fixes to the interactive islands

Required checks

  • npm run check passes (schema validation) — 0 errors
  • npm run enforce passes — N/A to these files, CI runs it
  • npm test passes — 250/250
  • npm run build succeeds — 6652 pages

For catalog entries

N/A — no catalog entries changed.

For recipes

N/A — no recipes changed.

🤖 Generated with Claude Code


Generated by Claude Code

claude added 5 commits July 3, 2026 18:37
hashInlineScript emitted a bare `sha256-…`, which browsers reject as an
"invalid source" (console errors on every page). Under Report-Only this is
invisible, but once CSP_MODE=enforce flips on, the inline scripts would fail
to match their hashes and be blocked. Quote at the single producer so each
hash is a complete, valid CSP source expression; extend the unit test to
assert every script-src hash is single-quoted.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LVPyHAtQ1cdK76RpFasafP
…lean"

A `{`-leading blob that fails JSON.parse fell through to line-parsing and was
reported as one clean dependency — a false all-clear on the dependency checker.
Add dependencyInputError() (additive; parseDependencyInput and its tests are
untouched) and surface it in PolicyChecker with a distinct error state plus a
neutral empty state. Valid package.json and name lists are unaffected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LVPyHAtQ1cdK76RpFasafP
F3: `.mc__meta dt` dimmed labels with opacity:0.8, dropping them below WCAG AA
(axe: 89 serious color-contrast nodes). Differentiate labels by weight only —
axe color-contrast now 0 in both light and dark themes.
F7: Model Compass and the cost estimator each re-rendered the page's title +
intro as an in-island <h2>/lead, duplicating the frontmatter H1. Remove the
duplicates (keep the functional sorting note + section aria-label).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LVPyHAtQ1cdK76RpFasafP
The "Try one" example prompts were a flat English array, so es/ar builders saw
English chips; and the es/ar /build/ page titles were literally "Build Studio"
while the sidebar label was translated. Move EXAMPLES to a per-locale map
(es/ar a careful first pass, flagged for native review — no protocol/product
terms) and translate the two frontmatter titles to match the sidebar.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LVPyHAtQ1cdK76RpFasafP
The Check card promised only "package.json" though the tool also accepts a
dependency list; the catalog card's "1,300+ verified tools" understated the
live catalog. Align both to the catalog page's own maintained phrasing
(a thousand-plus tools + 800+ datasets) and mention the dependency-list input.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LVPyHAtQ1cdK76RpFasafP
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
wecanjustbuildthings 8b4716b Commit Preview URL

Branch Preview URL
Jul 03 2026, 06:41 PM

@MartinMontero
MartinMontero merged commit ba21bba into main Jul 3, 2026
14 checks passed
@MartinMontero
MartinMontero deleted the claude/wcjbt-credential-health-check-64ymr3 branch July 3, 2026 19:15
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.

2 participants