Comprehensive review changes

This commit is contained in:
seavor 2026-04-20 18:58:40 -05:00
parent 3aa8c654cc
commit 6074d9d6e4
143 changed files with 2661 additions and 1535 deletions

View file

@ -88,7 +88,20 @@ function CreateCounterDialog({ isOpen, onSubmit, onCancel }: CreateCounterDialog
helperText={error ?? ''}
slotProps={{ htmlInput: { 'aria-label': 'Counter name' } }}
/>
<div className="create-counter-dialog__swatches" role="radiogroup" aria-label="Counter color">
<div
className="create-counter-dialog__swatches"
role="radiogroup"
aria-label="Counter color"
onKeyDown={(e) => {
if (e.key === 'ArrowRight' || e.key === 'ArrowDown') {
e.preventDefault();
setSelectedIdx((selectedIdx + 1) % SWATCHES.length);
} else if (e.key === 'ArrowLeft' || e.key === 'ArrowUp') {
e.preventDefault();
setSelectedIdx((selectedIdx - 1 + SWATCHES.length) % SWATCHES.length);
}
}}
>
{SWATCHES.map((s, idx) => (
<button
key={s.label}
@ -96,6 +109,7 @@ function CreateCounterDialog({ isOpen, onSubmit, onCancel }: CreateCounterDialog
role="radio"
aria-checked={idx === selectedIdx}
aria-label={s.label}
tabIndex={idx === selectedIdx ? 0 : -1}
className={cx('create-counter-dialog__swatch', {
'create-counter-dialog__swatch--selected': idx === selectedIdx,
})}