Skip to content

profile: fix heading hierarchy, add a dark-mode mark, drop the nbsp crutch - #2

Merged
stxkxs merged 1 commit into
mainfrom
fix/profile-accessibility-and-dark-mode
Aug 19, 2026
Merged

stxkxs merged 1 commit into
mainfrom
fix/profile-accessibility-and-dark-mode

Conversation

@stxkxs

@stxkxs stxkxs commented Aug 19, 2026

Copy link
Copy Markdown
Member

Structural and accessibility fixes to the org profile from the 2026-08-18 sweep. Content claims are deliberately untouched — the data-provenance work (217M+, refreshed nightly) is a separate PR that needs facts from citature-core.

Sequencing — please read

This PR must merge before the CI PR. The markdownlint job fails on main today, and these are exactly the errors it catches:

profile/README.md:1   MD041/first-line-heading   First line should be a top-level heading
profile/README.md:3   MD013/line-length          Expected 100, actual 155
profile/README.md:49  MD013/line-length          Expected 100, actual 125

CI cannot be green until this lands. Ordering: this → CI → required_status_checks → PR #1.

What changed

Heading hierarchy — a real a11y defect, not a style preference. Every section was ###; there was no h1 or h2 anywhere. A page with no top-level heading has no document title in the accessibility tree, so a screen-reader heading list started mid-hierarchy with no name for the page. The tagline is now the h1, sections are h2 — and inside the centered lockup it renders at the same visual weight as before.

MD041 wants the h1 on the literal first line, which a centered brand lockup can't satisfy. Rather than disable the rule repo-wide, the exception is scoped to this one file with the reason inline. MD041 stays enforced everywhere else.

Dark-mode mark. The mark hardcoded a cream #FAF6EF ground, so it read as a bright block on GitHub's dark theme. Adds mark-dark.svg, served via <picture> + prefers-color-scheme.

The green accent lifts from #157A5B to #2FA37E. That's a contrast fix, not taste:

ratio WCAG AA
#157A5B on #141414 (original, on dark) 3.48:1 ❌
#2FA37E on #141414 (lifted) 5.84:1 ✅
glyph, both themes 17.10:1 ✅

alt narrows from "citature — answers with receipts" to "citature" — the tagline is the h1 directly beneath, so the old text made screen readers announce it twice.

Separators and width. All four &nbsp;·&nbsp; sequences removed; they were doing layout work inside heading text. Qualifiers move into the prose line beneath each heading. Every line now fits 100 columns.

Verification

  • markdownlint-cli2 clean against the PR's config: 0 issues.
  • Both SVGs parse; contrast ratios computed, not eyeballed.
  • Rendering of <picture> + prefers-color-scheme is GitHub's documented theme-aware image mechanism.

…rutch

Structural and accessibility fixes to the org profile found in the
2026-08-18 maintenance sweep. Content claims are deliberately untouched —
the data-provenance work is a separate change.

──────────────────── Heading hierarchy ────────────────────

The profile had no h1 or h2 anywhere: every section was an `###`, chosen
for visual weight rather than structure. A page with no top-level heading
has no document title in the accessibility tree, so screen-reader users
got a heading list that started mid-hierarchy with no name for the page.

The tagline is now the h1 and sections are h2, which fixes the a11y
defect and happens to render at the same visual weight inside the
centered lockup.

MD041 wants the h1 on the literal first line, which a centered brand
lockup cannot satisfy — the mark leads the hero by design. Rather than
disable the rule repo-wide, the exception is scoped to this one file with
an inline comment stating why. MD041 stays enforced everywhere else, and
heading-increment checks still apply here.

────────────────────── Dark-mode mark ──────────────────────

The mark hardcoded a cream `#FAF6EF` ground with a near-black glyph, so
on GitHub's dark theme it read as a bright block. Adds
`profile/assets/mark-dark.svg` and serves it via `<picture>` with a
`prefers-color-scheme: dark` source.

The dark variant inverts the ground/glyph pair and lifts the green accent
from `#157A5B` to `#2FA37E`. The lift is a contrast fix, not taste: the
original green sits at 3.48:1 on the dark ground and fails WCAG AA, while
the lifted value reaches 5.84:1. Both themes now carry a 17.10:1 glyph.

`alt` narrows from "citature — answers with receipts" to "citature". The
tagline is the h1 directly beneath, so the old text made a screen reader
announce it twice; the mark stands for the brand name alone.

──────────────────── Separators and width ────────────────────

Removes all four `&nbsp;·&nbsp;` sequences, which were doing layout work
inside heading text and split the headings into two registers. Section
qualifiers move into the prose line beneath each heading, where they read
as sentences instead of decoration.

Every line now fits within 100 columns — previously the img tag ran to
155 and the footer to 125 — by breaking the HTML attributes across lines.

Co-authored-by: stxkxsbot <275011021+stxkxsbot@users.noreply.github.com>
@stxkxs
stxkxs merged commit 32eeddd into main Aug 19, 2026
@stxkxs
stxkxs deleted the fix/profile-accessibility-and-dark-mode branch August 19, 2026 06:40
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