Extras
TimeZonePicker
BitTimeZonePicker picks a time zone out of a searchable list that shows the offset from UTC, the place and the country of each one - for the time zone of a profile, a meeting or a report, and for the TimeZone of the date and time pickers. Value is a TimeZoneInfo or the IANA id of the time zone, whichever it is bound to; the list is the same on every runtime, Windows ids and renamed IANA ids are recognized, the visitor's own time zone can be preselected from the browser, and the whole field is keyboard and screen-reader operable.
Events, forms & accessibility
The events the picker raises, opening it and picking a time zone from code, posting it with a plain HTML form, translating its texts, and keyboard and screen-reader support.
Events
Programmatic control
Form submission
Localization
Accessibility
combobox role: Tab reaches it, and Enter, Space,
ArrowDown and ArrowUp open the list, as Home and End do on its first and last time zone. It carries
aria-haspopup="listbox" and aria-expanded, and aria-controls names
the list while it is open. The list is a listbox of option rows, the selected one
marked with aria-selected="true". It is moved to the end of the page while open, and the
root claims it back through aria-owns.
aria-labelledby. AriaLabel
names them instead, for a field with no visible label, and wins over the Label; with neither, the field is
named "Time zone" and the list "Time zones". The field and every row put a comma only a screen reader
reads between the offset, the place and (in a row) the country, so a row reads "UTC+03:30, Tehran, Iran"
rather than running together. The field and each row also carry that line in full as their tooltip.
combobox too, named by
SearchBoxAriaLabel, else the SearchBoxPlaceholder, else "Search time zones". Its
aria-activedescendant follows the arrow keys and Page Up and Page Down (ten rows at a time);
Home and End stay with its caret. Enter picks the active time zone and Escape closes the list, both giving
the focus back to the field, as a click outside the list does; Alt+ArrowUp closes it the way Escape does.
Tab moves on to what follows the field and closes the list, Shift+Tab goes back to the field and leaves it
open, and the list also closes once the focus moves anywhere else.
aria-activedescendant itself: Space picks as Enter does unless it falls inside a name being
typed, Alt+ArrowUp picks the active time zone as it closes the list, Tab closes the list and moves on, and
the letters and digits typed on the field, open or closed, jump to the time zone whose name they start.
aria-required and keeps its asterisk from being read out,
ReadOnly writes aria-readonly, an invalid value aria-invalid, and
Disabled the native disabled with aria-disabled. In forced-colors mode
the selected row takes the Highlight colors and the active row an outline.
Feedback
Found a mistake, a gap, or something that could be clearer? Every page and every component is one click from its source.