date-picker
date-picker copied to clipboard
VoiceOver guidance is unclear after date is selected
Describe the bug
I'm experiencing some strange behavior when using VoiceOver on Safari.
After I select a date, calendar closes and the browser focus moves back to the calendar button. The VoiceOver cursor stays on the date, which is now hidden. VoiceOver says, "you are currently on a toggle button, inside of a blank."
To Reproduce Steps to reproduce the behavior:
- Open the Duet Date Picker demo in Safari with VoiceOver running
- Use the VoiceOver keyboard controls to activate the calendar button. The calendar opens.
- Use the VoiceOver keyboard controls to navigate to a date and select it.
- The calendar closes.
- The message in the screenshot below should appear.
Expected behavior
I'd expect the VoiceOver cursor to return to the calendar button. I'd then expect VoiceOver to announce that I'm on the calendar button. (Adding an aria-live region might help.) Alternately, the calendar could remain open after I make a selection.
Thank you!
Screenshots

Desktop (please complete the following information):
- OS: macOS 12.4
- Browser: Safari 15.5