Skip to content

fix(textbox): body text sits 0.07 above the AA bar at lg - #263

Merged
sydevs-bot merged 2 commits into
mainfrom
claude/fix-205-ornate-contrast
Nov 18, 2026
Merged

sydevs-bot merged 2 commits into
mainfrom
claude/fix-205-ornate-contrast

Conversation

@sydevs-bot

@sydevs-bot sydevs-bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • OrnateTextBox body copy measured 4.57:1 at its worst. It now measures 5.19:1, in both layouts.
  • Four measured figures in the surrounding comments were taken at text-white/90; re-measured here.

Change outline

Three stacked layers paint the backdrop behind the body column. Which one a layout's body sits over decides which lever can move it, and that is why the fix needs two.

 OrnateTextBox                                  components/organisms/OrnateTextBox/OrnateTextBox.tsx
   brown ground            -z-20, full bleed    # the floor: nothing moves it
-  floral graphic          -z-10, opacity-40    # spans 45%→125% of the block
+  floral graphic          -z-10, opacity-25    # left-image body sits over this; right-image does not
   warm band               -z-10, w-1/3         # mirrors with the image, so no body column crosses it
   Container z-10
     h2 + subtitle                              # unchanged — see #262
     image                  lg:float-<align>
-    body wrapper           text-white/90        # the only lever the right-image layout has
+    body wrapper           text-white           # root already paints white; this drops the alpha

Preview

Both Cloudflare previews build from this push; neither alias exists yet, so the links are pending. The Ladle playground is where this is visible — story organisms--ornate-text-box, at /?story=organisms--ornate-text-box, all four sections.

  • Ladle playground, organisms--ornate-text-box — the two left-image sections move, the right-image one moves only with the body-copy change — preview pending
  • Web Worker — renders this wherever a SahajCloud page carries an ornate side block, but nothing in the repo pins such a page, so there is no deep link to give — preview pending

Test results

  • Lean gate: ✓ pnpm lint, tsc --noEmit, pnpm test:run (114 files, 1091 tests)
  • Targeted specs: 26 passed — components/organisms/OrnateTextBox and layouts/tailwind.test.ts
  • Build: N/A — no build, server or Wrangler path changed
  • Added-comment lint: ✓ no banned comment added
  • Security review: skipped — no path matches securityReview.triggerPattern

Manual verification

  1. Open the Ladle story at 1024px and confirm the floral graphic still reads as an ornament at opacity-25, not as a blank ground.
  2. Narrow to mobile width and confirm the same.
  3. Confirm the body copy still reads softer than nothing else — the title, subtitle and sidetext keep their own weights, so the hierarchy should be unchanged apart from the body being fully opaque.

Notes for reviewer

  • The header is broken and this PR does not fix it. Measuring for this ticket turned up the title at 2.47:1 against a 3:1 bar and the subtitle at 2.11:1 against 4.5:1, both in the left-image layout, from the warm band rather than from transparency. Filed as fix(textbox): the OrnateTextBox header fails AA over the warm band #262 with the figures and four options; every one of them is a design call, and fix(textbox): body text sits 0.07 above the AA bar at lg #205's own Approach records the opposite decision for the subtitle, so it is not mine to make here. The figures are identical with and without this PR's two changes.
  • text-white on the body wrapper is inherited-equivalent — the root at :132 already paints white, so the change that matters is dropping /90. Kept the explicit token because the subtitle and sidetext each spell their own, and it is the spelling decision 2A names. The test pins the absence of alpha rather than the token, so the cleanup stays open; fix(textbox): the OrnateTextBox header fails AA over the warm band #262 proposes it.
  • Dismissed: a shared classesFor(html, token) helper for tests/_helpers/markup.ts. Ten-plus call sites across four files already hand-roll it; collapsing them is its own change, not this one's.
Measured before and after, per width and alignment

Method: headless Chromium, deviceScaleFactor 1, viewport height 800, pnpm ladle:build served statically, story organisms--ornate-text-box at ?mode=preview, body text hidden, full-page capture, 50 columns × 13 rows sampled per paragraph over 120 characters, the body colour composited over each sample, worst taken. This reproduces #205's "shipped" column exactly at all seven widths, which is what says the two runs measure the same thing.

s0, s2, s3 are the left-image layout. s1 is the right-image layout — 122 of the 123 imported ornate blocks.

Body copy, opacity-40 + text-white/90 → opacity-25 + text-white:

Width s0 left s1 right s2 left s3 left
1024 4.83 → 6.24 4.57 → 5.19 5.17 → 6.58 5.26 → 6.71
1200 4.96 → 6.30 4.76 → 5.42 4.63 → 6.06 4.63 → 6.06
1280 5.03 → 6.49 4.82 → 5.50 5.03 → 6.29 5.12 → 6.51
1366 4.96 → 6.27 4.84 → 5.52 5.13 → 6.48 5.26 → 6.68
1440 4.84 → 6.18 4.97 → 5.69 4.83 → 6.24 4.77 → 6.15
1600 4.92 → 6.36 4.82 → 5.83 4.77 → 6.27 4.84 → 6.36
1920 4.63 → 5.98 4.89 → 6.03 4.75 → 6.31 5.05 → 6.38

Worst cell: 4.57 → 5.19, both at 1024 in the right-image layout. Every cell clears 5.19.

Sidetext, text-white/75, unchanged by the diff but lifted by the fainter graphic. Bar is 3:1:

Width s0 left s1 right s2 left s3 left
1024 4.23 → 4.92 3.12 → 3.54 4.50 → 5.20 4.50 → 5.20
1200 4.16 → 4.92 3.47 → 3.84 4.16 → 4.97 4.16 → 4.97
1280 4.16 → 4.97 3.47 → 3.94 4.16 → 4.97 4.18 → 4.97
1366 4.16 → 4.97 3.37 → 3.82 4.18 → 4.98 4.18 → 4.98
1440 4.16 → 4.97 3.44 → 3.92 4.18 → 4.98 4.18 → 4.98
1600 4.18 → 4.98 3.50 → 4.06 4.21 → 4.98 4.21 → 4.99
1920 4.21 → 4.99 3.51 → 4.06 4.21 → 4.99 4.21 → 4.99

Below lg, where the body column is full-width and crosses the faint band:

Width s0 s1 s2 s3
390 4.85 → 5.54 4.80 → 5.77 5.11 → 5.85 5.13 → 5.88
768 4.97 → 5.68 5.03 → 5.83 5.02 → 5.74 5.02 → 5.74
1023 4.97 → 5.68 5.02 → 6.01 5.06 → 5.79 5.04 → 5.77

The four figures the comments carry, re-measured at text-white: the band below lg reads 2.57:1 at full strength and 5.54:1 faint, against a 5.77:1 ceiling from the brown ground alone, and an un-mirrored band would put the body column at 2.50:1. Each was measured by overriding the one declaration involved, so no step needed a rebuild.

Closes #205

🤖 Generated with Claude Code

https://claude.ai/code/session_01Mg9rjXxk6u2VB3jpWXYp4H

The worst cell on main measured 4.57:1 — 0.07 above 4.5:1 — in the
right-image layout, which is 122 of the 123 imported ornate blocks.

Two levers, per the decisions on #205. The graphic drops to opacity-25,
which moves only the left-image layouts; the body copy drops its own 10%
transparency, which is the only lever that reaches the right-image one,
whose column sits off the graphic entirely. The measured floor becomes
5.19:1 at 1024px, and every cell clears 5.19.

The figures the surrounding comments carry were measured at text-white/90
and no longer hold, so they are re-measured here: the below-lg band now
reads 2.57:1 at full strength and 5.54:1 faint, against a 5.77:1 ceiling
set by the brown ground alone, and an un-mirrored band would put the body
column at 2.50:1.

Closes #205

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjXxk6u2VB3jpWXYp4H
The root already paints text-white, so the body wrapper's own copy of it
is inherited-equivalent and asserting it blocked a later cleanup for no
contrast reason. The contract is that the body copy carries no alpha.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjXxk6u2VB3jpWXYp4H
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Adversarial review skipped: 2 file(s), 34 changed line(s), under review.skipWhen. Say @sydevs-bot review to force one.

🤖 sydevs dispatcher

@sydevs-bot sydevs-bot moved this from Pending to Awaiting in SYDevelopers Technical Roadmap Nov 18, 2026
@sydevs-bot
sydevs-bot added this pull request to the merge queue Nov 18, 2026
@sydevs-bot

sydevs-bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 no session running

Written by the sydevs dispatcher. Sessions never edit this comment.

@sydevs-bot sydevs-bot moved this from Awaiting to Pending in SYDevelopers Technical Roadmap Nov 18, 2026
Merged via the queue into main with commit 39ed29b Nov 18, 2026
24 checks passed
@sydevs-bot
sydevs-bot deleted the claude/fix-205-ornate-contrast branch November 18, 2026 21:12
@sydevs-bot sydevs-bot moved this from Pending to Done in SYDevelopers Technical Roadmap Nov 18, 2026
sydevs-bot pushed a commit that referenced this pull request Nov 19, 2026
`order-*` moved the header above the image for the eye and never for a
screen reader, which reads source order: image alt, then title, subtitle,
body. The float forced that split, because a float only moves what follows
it, so the header could only share the text column by coming after the
image.

Two grid columns remove the choice. Source order is title, subtitle, image,
body, and it is the reading order at every width — below `lg` as ordinary
block flow, at `lg` as explicit row and column placement. Placement is
explicit because auto-placement would follow source order, which is the one
thing this layout must not do.

The composition is unchanged: measured at the seven widths, every title
clears 3:1, every subtitle 4.5:1 and every body cell the 5.19:1 floor #263
set, reproducing the float's figures. At 1440px the header is 391px wide,
the body column's own width, and at 390px the painted order is title,
subtitle, image, body with the header at the full content width.

Answers the reading-order question thread on #269 — option C (Ardnived).

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjWeWiKL7xNtsm4C7Pt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

fix(textbox): body text sits 0.07 above the AA bar at lg

3 participants