Skip to content

fix: hold WCAG AA for small text on mobile veil panels - #44

Merged
axisrow merged 1 commit into
mainfrom
ao/axisrow.github.io-30/panel-aa-contrast
Aug 14, 2026
Merged

fix: hold WCAG AA for small text on mobile veil panels#44
axisrow merged 1 commit into
mainfrom
ao/axisrow.github.io-30/panel-aa-contrast

Conversation

@axisrow

@axisrow axisrow commented Aug 14, 2026

Copy link
Copy Markdown
Owner

Closes #43.

Что проверялось

Патч из сессии -14 использован как описание намерения, а не как diff — как и просил issue. Пересчитал контраст под текущими --panel-veil (88% light / 86% dark), а не под теми 55/50%, при которых патч писался.

Фон считался как композит tint-а вейла над всеми 256 тонами палитры эффекта (не над плоской панелью): библиотека интерполирует пять стопов в 256-элементный ramp, так что худший случай надо искать по интерполяции, а не только по стопам.

Результат

Токен Light, худший фон #e4e4df Dark, худший фон #29251c
--ink 13.84:1 ✅ 13.06:1 ✅
--ink-soft (панельный) 8.01:1 ✅ 10.66:1 ✅
--ink-faint (панельный) 6.74:1 ✅ 8.97:1 ✅
--success 4.01:1 ❌ 7.58:1 ✅
--accent 3.91:1 ❌ 5.86:1 ✅
  • Тёмная тема правок не требует. Зафиксированные в патче 2.5:1 / 2.7:1 при 88/86% не воспроизводятся — существующих ink-переопределений хватает.
  • В светлой теме два токена не проходят AA: их несут 9px .proof-row small и 11px .timeline-index поверх живого канваса.

Правка

Панельные переопределения --success: #257151 и --accent: #91553a (только светлая тема) добавлены рядом с уже существующими ink-переопределениями. Затемнение ~11% при сохранении тона — оба выходят на 4.6:1. Значения --panel-veil не тронуты.

Отдельно проверено, что .project-surface (карточки проектов с .card-star / .card-tag) — тоже .veil-panel, но канваса за ней нет, поэтому глобальные тона там остаются: переопределение на неё сознательно не распространяется.

Тест

Новый тест не пинит хексы, а считает контраст, вычитывая палитру из effect-skins.js и альфу вейла из styles.css — останется осмысленным, если сдвинется любое из двух. Проверено, что он краснеет при откате правки (#287c59 only reaches 4.01:1).

npm test — 49/49. Визуально обе темы проверены на мобильной ширине над живым мандельбротом.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VFW1GLbvUL44xLpA7ADeEa

At the current --panel-veil (88% light / 86% dark) the ink overrides already
clear AA, but the light theme's global --success (#287c59) and --accent
(#a15f40) do not: over the darkest backdrop the veil can composite (#e4e4df,
the tint over the palette's #526b75 stop) they land at 4.01:1 and 3.91:1,
below the 4.5:1 floor for the 9px .proof-row small and the 11px .card-star /
.card-tag / .eyebrow.

Add panel-local light-theme overrides alongside the existing ink ones,
darkened ~11% so the hue is preserved. The dark theme needs no equivalent --
its worst backdrop is #29251c and every token already sits above 5.6:1 -- so
the 2.5:1 / 2.7:1 figures recorded when the veil was 55/50% no longer
reproduce and nothing changes there.

The new test computes contrast from the palette and veil alpha read out of the
sources rather than pinning hexes, so it stays meaningful if either moves.

Closes #43

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VFW1GLbvUL44xLpA7ADeEa
@axisrow
axisrow merged commit 12c9603 into main Aug 14, 2026
1 check passed
@axisrow
axisrow deleted the ao/axisrow.github.io-30/panel-aa-contrast branch August 14, 2026 10:01
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.

Контраст AA для текста на полупрозрачных панелях (перенос работы из сессии -14)

1 participant