fix: a11y fixes#1824
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughThis PR adds two accessibility improvements to the frontend: stable accessibility wiring for combobox and select components using ChangesCombobox and Select Accessibility Wiring
Reduced Motion Support
🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
aria-controls on comboboxes
When you put role="combobox" on a button, screen readers announce it as a combo box — a text-field-plus-dropdown pattern. The ARIA spec requires aria-controls to point to the ID of the popup list so assistive tech
can link the two: "this button controls that list." Without it, a screen reader user knows a combobox exists but can't navigate to its options.
The fix: generate a stable unique ID with useId(), put it as the id on the listbox element (CommandList / CommandGroup), and reference it via aria-controls={listboxId} on the button.
prefers-reduced-motion
Some users have vestibular disorders where animations cause nausea or dizziness. They set "reduce motion" in their OS settings, which the browser exposes as prefers-reduced-motion: reduce. WCAG 2.3.3 requires sites
to respect this.
The project uses Framer Motion extensively but never checked this preference — every animation played regardless. The fix is a global CSS rule that forces all animations and transitions to essentially 0ms duration
when the user has requested reduced motion. It's a single catch-all that covers both CSS animations and Framer Motion (which uses inline styles that inherit transition-duration behavior from the cascade when
!important is used).
The ESLint warning on allOptions at line 71 is pre-existing and unrelated to our changes — it's about the useEffect at line 90 that was already there.
Summary by CodeRabbit