Skip to content

TimePicker

What component has

Keyboard support

Keyboard support
KeyFunction
Tab, Moves focus to the next (previous) focusable element.
First, the entire time picker is focused. Then, the focus moves to the hours combobox, followed by the minutes combobox, and finally the AM/PM button, if it's present.
Up Arrow , Down ArrowMoves selection between dropdown options. If the last (first) option is selected, selection moves to the first (last) option cyclically.
EnterApplies the selected option and closes the dropdown.
EscCloses the dropdown without changing the value.

Roles and attributes

The following list describes roles and attributes that the component already has.

Roles and attributes
ComponentAttributeUsage
TimePickeraria-labelDefines the accessible name of the entire TimePicker. Automatically includes the text from the label connected by the for attribute.
TimePickerrole="group"Defines a group of elements.
TimePicker.Hours, TimePicker.Minutesaria-label="Hours", aria-label="Minutes"Defines the accessible names for the comboboxes.
TimePicker.Hours, TimePicker.Minutesrole="combobox"Identifies the element as a combobox—a text input combined with a list of options.
TimePicker.Hours, TimePicker.Minutesaria-expanded="false/true"Indicates whether the dropdown is open or not.
TimePicker.Hours, TimePicker.Minutesaria-autocomplete="list"Indicates that autocomplete is implemented by displaying a list of options during input.
TimePicker.Hours, TimePicker.Minutesaria-controls="#IDREF"Identifies the element that serves as the dropdown.
TimePicker.Hours, TimePicker.Minutesaria-haspopup="listbox"Indicates that the connected dropdown is a listbox.
TimePicker.Separatoraria-hiddenHides the separator from assistive technology.
TimePicker.Formataria-describedbyProvides the button's description for assistive technology.
spanaria-live="polite", role="status"Announces the status message when the time period (AM/PM) is changed.

Resources

TimePicker consists of several components that have their own accessibility guidelines:

Other recommendations

Find more accessibility recommendations in the common Accessibility guide.

Released under the MIT License.

Released under the MIT License.