You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using react-datepicker in date range mode with the inline prop inside a popover, NVDA screen reader announces all selected date cells in a non-sequential, unpredictable order as soon as the popover opens — even if focus lands elsewhere in the popover (e.g. a tabs widget).
The root cause is that NVDA enters browse mode when a dialog opens and sweeps the entire dialog with its virtual cursor. Because the calendar renders all selected date cells with aria-selected="true" on mount, NVDA reads them all out immediately. The library currently provides no focus management API (e.g. autoFocus targeting a day cell, or an onCalendarOpen callback with a stable DOM reference) to suppress or control this behavior.
Expected behavior
When the calendar mounts, no automatic announcements should be triggered. Selected state should be communicated only when the user individually focuses a date cell (e.g. "June 6th, 2025, selected").
Additional context
A possible fix would be for the library to explicitly move focus to a specific day cell (e.g. the range start date or today) when the calendar mounts, following the ARIA authoring practices for date picker dialogs. This would prevent NVDA from sweeping the grid in browse mode.
Describe the bug
When using
react-datepickerin date range mode with theinlineprop inside a popover, NVDA screen reader announces all selected date cells in a non-sequential, unpredictable order as soon as the popover opens — even if focus lands elsewhere in the popover (e.g. a tabs widget).The root cause is that NVDA enters browse mode when a dialog opens and sweeps the entire dialog with its virtual cursor. Because the calendar renders all selected date cells with
aria-selected="true"on mount, NVDA reads them all out immediately. The library currently provides no focus management API (e.g.autoFocustargeting a day cell, or anonCalendarOpencallback with a stable DOM reference) to suppress or control this behavior.To Reproduce
Observed behavior
NVDA reads all selected dates immediately upon calendar mount, in random order:
Expected behavior
When the calendar mounts, no automatic announcements should be triggered. Selected state should be communicated only when the user individually focuses a date cell (e.g. "June 6th, 2025, selected").
Screen recording
bug_selected_random.mp4
CodeSandbox
https://codesandbox.io/p/sandbox/whmgvn
Desktop:
"react": "18.2.0",
"react-dom": "18.2.0",
"react-datepicker": "^9.1.0"
Additional context
A possible fix would be for the library to explicitly move focus to a specific day cell (e.g. the range start date or today) when the calendar mounts, following the ARIA authoring practices for date picker dialogs. This would prevent NVDA from sweeping the grid in browse mode.