Skip to content

Stop the row opacity compounding, which failed AA on 18 tags - #26

Merged
Varnasr merged 3 commits into
mainfrom
claude/outdated-repos-maintenance-nbxnae
Sep 23, 2026
Merged

Varnasr merged 3 commits into
mainfrom
claude/outdated-repos-maintenance-nbxnae

Conversation

@Varnasr

@Varnasr Varnasr commented Sep 23, 2026

Copy link
Copy Markdown
Owner

.row span { opacity: .7 } matched more than the tag it was written for. .t is itself a span, wrapping the title and the tag, so the selector applied to the tag twice and to the title once.

Measured on this landing page at 1280×900 and 390×844:

element effective alpha result
tag ("Python, R", "44 do-files") 0.7 × 0.7 = 0.49 #84827f on #f6f2ea, 3.43:1 at 10.56px
title ("Econometrics") 0.7 6.98:1, at font-weight: 600

axe-core reported 18 serious colour-contrast violations, one per row. AA needs 4.5:1 at that size. The title being dimmed at all is the opposite of what .row b { font-weight: 600 } exists to do.

Scoping to .row .t > span:

after
tag #535251 on #f6f2ea, 6.98:1
title 17.39:1
hover (tag, white on ink) 8.68:1

The same selector, the same trap, twice

The comment twelve lines below already records this:

.row span above sets white-space: nowrap for the short language tag. A description is also a span, so it inherited that and ran off the side of the phone instead of wrapping. Scope the nowrap to the tag.

white-space was scoped. opacity was not. One selector, two properties, the same mistake, caught a year apart.

Family-wide

assets/css/stack.css is byte-identical across InsightStack, FieldStack, EquityStack and SignalStack by design, so the change lands in all four and they stay identical (49c6c2ae…).

Counted before the fix, per landing page: InsightStack 18, EquityStack 12, SignalStack 7, FieldStack 0 — FieldStack's page uses different markup and takes the file only to stay in step.

Verified

0 serious or critical axe violations on all four landing pages at both widths, no horizontal overflow. The six calculators were clean throughout, before and after. Suites re-run: EquityStack 101 pass, SignalStack 23 pass plus companions --check, and this repo's five Python suites pass (18, 8, 9, 4, 17) against pandas 3.0.6 — the dtype == object hazard CLAUDE.md warns about is already handled in data_validation/validate.py.

One pre-existing moderate violation is left alone: <section class="hero"> sits outside <main>, so axe's region rule flags it. It is structural, affects each landing page's own markup rather than the shared CSS, and is not this change.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MrvR2NXsJFVRCeJZFCPuNL


Generated by Claude Code

claude and others added 3 commits September 22, 2026 17:41
tests.yml runs the Python and R suites and says nothing about the nine HTML
files this repository serves. The traps are all written down in CLAUDE.md and
none of them was checked by anything.

taguette_coding/tag_summary_export.html opened with <html><body> and had no
head at all: no viewport, no charset, no title, no lang. Without a viewport a
phone lays the page out at desktop width and zooms out, so the text arrives too
small to read, and it looks correct on the machine it was built on. Without a
charset the curly quotes and the en dash in the exported transcript depend
entirely on the server's default. The exported content is untouched; only a
head is added above it.

scripts/check_site.py runs 40 checks over the eight pages. Three are worth
naming.

GitHub Pages runs jekyll-readme-index, so a folder becomes a page only if it
holds a README.md. The index links two folders, data_starters/dhs-south-asia/
and data_starters/plfs-india/, and both work only because they hold one. A
folder link without a README is a 404 in production and a 200 under
python -m http.server, which generates a directory listing; CLAUDE.md records
that mistake shipping once.

_config.yml must set no theme and must keep applying the default layout.
Before that layout existed the config set theme: minima, and any rendered
README opened in stock styling, so a click-through stopped looking like the
site.

And no page may carry its own <style> block, because the house style is one
file shared verbatim across the stack repositories and a page reaching for its
own CSS is how that quietly stops being true.

Three checks were fault-injected against a real failure to confirm they bite.

Also verified while doing this, and not changed because nothing was wrong: the
landing page and all six calculators render at 390x844 with
documentElement.scrollWidth equal to clientWidth, so the white-space: nowrap
fix CLAUDE.md describes is holding. The only element outside the viewport is
the skip link at -999px, which is where it belongs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MrvR2NXsJFVRCeJZFCPuNL
`.row span { opacity: .7 }` matched more than the tag it was written
for. `.t` is itself a span, wrapping the title and the tag, so the
selector applied to the tag twice and to the title once.

Measured on this landing page at 1280x900 and 390x844:

  tag     0.7 x 0.7 = 0.49 -> #84827f on #f6f2ea, 3.43:1, 10.56px
  title   0.7              -> 6.98:1, at font-weight 600

axe-core reported 18 serious colour-contrast violations, one per row.
AA needs 4.5:1 for text that size. The title being dimmed at all is the
opposite of what `.row b { font-weight: 600 }` exists to do.

Scoping the opacity to `.row .t > span` gives:

  tag     0.7  -> #535251 on #f6f2ea, 6.98:1
  title   1.0  ->                     17.39:1
  hover   tag 0.7 white on ink        8.68:1

The comment twelve lines below already records this same selector doing
this same thing to `white-space`: a description is also a span, so it
inherited nowrap and ran off the side of a phone. That was scoped and
this was not. One selector, two properties, the same trap, fixed a year
apart.

assets/css/stack.css is byte-identical across InsightStack, FieldStack,
EquityStack and SignalStack by design, so the same change lands in all
four and they stay identical. Counted before the fix: InsightStack 18
elements, EquityStack 12, SignalStack 7. FieldStack's landing page uses
different markup and had none, and takes the file to stay in step.

After: 0 serious or critical violations on all four landing pages at
both widths, no horizontal overflow, and the six calculators were clean
throughout.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MrvR2NXsJFVRCeJZFCPuNL
The remote branch still carried a commit that reached main as a squash
merge. Its content is identical to main, so this merge changes no file;
it exists only so the branch can fast-forward.
@Varnasr
Varnasr merged commit 39b2140 into main Sep 23, 2026
3 checks passed
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