Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(DatePickerInput): announce keyboard guide
This change adds a content that is referred from `aria-describedby` in date picker's `<input>` (for single/range mode). The content announces how to navigate to, and how to navigate within calendar dropdown by keyboard. There were a few options in order to announce how to navigate to date picker; Two of them are from W3C WAI-ARIA Authoring Practices 1.1, a) Date Picker Dialog Example, b) Combobox with Grid Popup Example. a) has very different user interaction model from ours, because we want date picker to be open when the `<input>` gets focus but a) opens date picker only when the calendar icon is clicked. b) lets us announce the existence of dropdown, etc. in a similar manner as our other dropdown components do, but `role="combobox"` does not sound adequate for a date picker. Therefore, this change uses a custom content to announce how to navigate to calendar dropdown, rather than the content screen reader automatically creates/announces. Refs carbon-design-system#5310.
- Loading branch information