refactor(a11y): 44×44 touch targets + normalize accent-bg alpha

This commit is contained in:
Александр Зимин
2026-05-14 17:32:10 +00:00
parent c866a68f06
commit 35c69fd010
5 changed files with 26 additions and 10 deletions
@@ -27,7 +27,9 @@ export function ThemeSwitch() {
<div
role="radiogroup"
aria-label={t('theme.label')}
className="inline-flex items-center rounded-md border border-line bg-surface h-7 overflow-hidden"
// h-11 = 44px WCAG AAA touch target per DESIGN.md §13.
// Segmented control: 3 buttons × w-11 = 132px total width.
className="inline-flex items-center rounded-md border border-line bg-surface h-11 overflow-hidden"
>
{items.map((item) => {
const Icon = item.icon
@@ -42,7 +44,8 @@ export function ThemeSwitch() {
title={item.label}
onClick={() => setPreference(item.id)}
className={cn(
'inline-flex h-full w-7 items-center justify-center transition-colors',
// w-11 paired с parent h-11 → 44×44 per button.
'inline-flex h-full w-11 items-center justify-center transition-colors',
active
? 'bg-accent text-on-accent'
: 'text-mute hover:text-ink hover:bg-surface-2',