refactor(a11y): 44×44 touch targets + normalize accent-bg alpha
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user