Accessibility
AdvancedDateRangePicker stacks a SegmentedControl over a DatePicker. Keyboard and screen reader semantics come from @prepared911/ui-core and react-day-picker; the component wires them together but does not announce mode changes or the committed value. The app owns the accessible name for the control group, the trigger (when hosted in a popover), focus handoff between mode strip and grid, and any Apply-time announcement.
SegmentedControl renders a radio-group-like set of SegmentedControlItems. The current mode carries aria-checked / pressed state; keyboard users move between items with arrow keys.DatePicker ships react-day-picker's grid (roving tabindex, arrow keys, aria-selected, aria-disabled).MonthCaption controls. Previous / next IconButtons with localized titles; month / year Selects inherit @prepared911/ui-core Select listbox semantics.@prepared911/ui-core Buttons when onApply is set (or when hideReset is false).DatePickerMode.Range; Before / After render DatePickerMode.Single. The grid's roles match the active mode automatically.role="group" or aria-label on its root. Wrap it in a Box with role="group" and an aria-label or aria-labelledby that names the constraint ("Incident created").aria-label.disablePastDates / disableFutureDates / disableFuture in surrounding copy; disabled styling alone is not a name.SegmentedControl semantics.DatePicker: Up / Down by week, Left / Right by day, Home / End within a week.role="group" with aria-labelledby pointing at a visible label, or aria-label when no visible label is present.SegmentedControl from @prepared911/ui-core (Radix-backed) with aria-checked or aria-pressed per item.role="grid" with role="gridcell" days; aria-selected indicates the selected date or range endpoints.<button> elements via @prepared911/ui-core Button.When the picker is mounted inside a Popover, the hosting surface opens the popover and focus lands in the mode strip. Switching modes changes the grid below but keeps focus on the mode item; the next Tab moves into the newly configured grid. On Apply, the hosting surface should close the popover and restore focus to its trigger.
SegmentedControl announces each mode's label as it receives focus. The grid announces the focused day. Neither surface announces the committed value after Apply. Echo the committed constraint in visible copy—a filter pill or summary line—so assistive technology users hear the full rule:
Keep announcements polite (not assertive) unless the change is urgent; Before / After / Between are filter refinements, not alerts.
role="group" with a name.