Every topic chip was dark ink on a dark fill, and the evidence tier said nothing - #15
Merged
Merged
Conversation
js/dyslexia-font.js sets `opacity: var(--dys-idle-opacity, .72)` on #dys-font-btn. That composites whatever ink the surrounding bar uses down by 28%. Measured on pinpointventures, where the bar's ink is #4b5563 at 6.41:1, the idle button came out #7d858f: 3.73:1, under AA. The comment above that rule argues, at length and correctly, that leaving the site's own ink alone is the one version that cannot go wrong, because it is the ink the site already chose for that bar. Then it takes 28% off it, which undoes exactly that guarantee. A control that exists so people who find text hard to read can read it should not be the hardest thing on the page to read. The default is 1 now. The idle/on distinction already rode on the border and the accent wash, plus OpenDyslexic in the label and aria-pressed for anyone who cannot see either, so nothing is lost by not dimming it. This file is copied into 18 repositories. Seventeen were byte-identical and one, JanVayu's, was ahead: it carries a 44px minimum touch target (WCAG 2.5.5 Target Size) and a placement option that the other seventeen never received. Both improvements are merged, and all 18 copies now hold the same file. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MrvR2NXsJFVRCeJZFCPuNL
Measured with axe at 1280x900 and 390x844, in light and in dark, using real prefers-color-scheme emulation. 280 serious or critical nodes across the home page; 0 now on index, study and about, in both schemes. THE TEN TOPIC CHIPS. The dark block redefined only the ten `-bg` fills and left the ten inks at their light values, so each chip painted dark on dark: --topic-economic #4a4a4a on #1c1c1c at 1.92:1, --topic-governance 2.03, --topic-infrastructure 2.19, --topic-agriculture 2.70. Darkening a fill while keeping its ink preserves the hue and destroys the contrast, which is why all ten failed together and none of them looked obviously wrong. Each ink is now the same hue lifted until it clears 5:1 on its own fill. That was 134 of the 244 dark-mode nodes. --text-muted was #8a8a8a in light (3.14:1 on the warm panel) and #7d8590 in dark (4.22:1 on the chip fill). It is the ink of every header stat, the results count and the filter note. --evidence-moderate was #c17825 at 3.51:1, and it is the tier name on the about page. .chip-count took `opacity: 0.65` on top of the muted token, which put the count beside every filter back under AA however the token was set. Opacity on a colour that has already been measured is not a shade, it is an unmeasurement. TWO CRITICAL ONES, both structural rather than colour: #card-grid declared role="list" and held <article> children. A list promises its children are listitems; these are not, so a screen reader was told to expect something the DOM does not contain. The cards are not a list in any useful sense, so the role is gone rather than papered over with role="listitem" on 204 cards. #sort-select had a visible "Sort" heading beside it written as a <div>, which names nothing. It carries an aria-label now. npm run validate still passes on all 204 studies. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MrvR2NXsJFVRCeJZFCPuNL
.card-evidence is a second chip system with exactly the problem the topic chips had, and the first pass missed it because it sits far from them in the file: three literal light fills (#e8f5ee, #fef3e4, #f0f0f0) with no dark override, and three inks with no dark value. In dark mode --evidence-strong #3d7a5f measured 3.19:1 and --evidence-moderate #9d5f17 3.14:1 on the card. The fills are tokens now and both themes carry a full set, so the strong / moderate / emerging label reads in either. Verified at 7.36, 7.01 and 6.85 to one in dark, and 4.52, 4.69 and 4.68 in light. index, study and about are now 0 serious or critical in both schemes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MrvR2NXsJFVRCeJZFCPuNL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
The evidence tier no longer distinguishes anything, and the page now says so instead of drawing a meter.
evidenceTier()returnsstrongwhen a study has four or more references; every one of the 204 has four or five, so it returnsstrongfor all 204 and themoderateandemergingbranches are unreachable. Before the reference-count fix, eight studies reademerging— all eight were among the fifteen whose references were not being counted, so the tier was reporting a parser bug rather than the evidence.A constant is survivable in a data file and not on a page:
study.htmldrew it as a filled meter reading "Strong Evidence Base" at 80 or 90 per cent. A bar at 80 per cent implies a measurement against a maximum; there is no maximum and nothing was measured. The card and study page now report the reference count (4 or 5) and two signals that are not constants and are computed rather than scored: cites experimental or quasi-experimental work (61 of 204) and cites a systematic review or meta-analysis (7 of 204). There is a sidebar facet for them, where selecting both means both.evidenceTier()itself is untouched. What counts as strong evidence is an editorial judgement about the library, not a bug to patch, and picking a threshold is the owner's call.Every topic chip was dark ink on a dark fill, and the page said nothing about it.
Type of change
Checklist
npm run validatepasses — 204 slugs agree across all four derived filesCommits
🤖 Generated with Claude Code
https://claude.ai/code/session_01MrvR2NXsJFVRCeJZFCPuNL
Generated by Claude Code