UNPKG

@progress/wct-a11y-spec

Version:

Contains accessibility and keyboard navigation specification of Telerik and Kendo web components.

289 lines 10.6 kB
[ { "h2": "Accessibility Support" }, { "p": "Out of the box, the Telerik and Kendo UI DateTimePicker provides extensive accessibility support and enables users with disabilities to acquire complete control over its features." }, { "p": "The DateTimePicker is compliant with the [Web Content Accessibility Guidelines (WCAG) 2.2 standards](https://www.w3.org/TR/WCAG22/) and [Section 508](http://www.section508.gov/) requirements, follows the [Web Accessibility Initiative - Accessible Rich Internet Applications (WAI-ARIA)](https://www.w3.org/WAI/ARIA/apg/) best practices for implementing the [keyboard navigation](#keyboard-navigation) for its `component` role, provides options for [managing its focus](#managing-the-focus) and is tested against the most popular [screen readers](#screen-readers)." }, { "h3": "WAI-ARIA" }, { "p": "This section lists the selectors, attributes, and behavior patterns supported by the component and its composite elements, if any." }, { "h4": "Input element" }, { "table": { "headers": [ "Selector", "Attribute", "Usage" ], "rows": [ { "Selector": "`.k-input-inner`", "Attribute": "`role=combobox`", "Usage": "The input element should follow the `combobox` specification." }, { "Selector": "", "Attribute": "`label for` or `aria-label` or `aria-labelledby`", "Usage": "The input needs an accessible name to be assigned to it." }, { "Selector": "", "Attribute": "`aria-required=true`", "Usage": "The attribute is rendered only when the DateTimePicker is in a `form` HTML element and announces the required state of the component." }, { "Selector": "", "Attribute": "`aria-describedby=.k-form-hint id/.k-form-error id`", "Usage": "Points to the hint for the input, or if the input is invalid, to the error message. This attribute should only be present when a hint is set or when the input is invalid." }, { "Selector": "", "Attribute": "`aria-haspopup=dialog`", "Usage": "Indicates the component has a Dialog Popup." }, { "Selector": "", "Attribute": "`aria-expanded=true/false`", "Usage": "Announces whether the Popup is visible or not." }, { "Selector": "", "Attribute": "`aria-controls=.k-calendar-container id`", "Usage": "Points to the popup element. Signifies that the `combobox` element controls the Calendar `grid`." }, { "Selector": "", "Attribute": "`aria-activedescendant=.k-calendar-td.k-focus id`", "Usage": "Points to the focused item (date/month/year/hour/minute) in the Calendar Popup or the Time Popup. Should only be present when the Popup is open." }, { "Selector": "", "Attribute": "`readonly=readonly` or `aria-readonly=true`", "Usage": "Attribute is rendered only when the DateTimePicker is readonly." }, { "Selector": "", "Attribute": "`aria-invalid=true`", "Usage": "Attribute is rendered only when the DateTimePicker is in form and announces the valid state of the component." }, { "Selector": "", "Attribute": "`tabindex=0`", "Usage": "The element should be focusable." }, { "Selector": "`.k-disabled .k-input-inner`", "Attribute": "`disabled=disabled` or `aria-disabled=true`", "Usage": "Attribute is rendered only when the DateTimePicker is disabled." }, { "Selector": "`.k-input-button`", "Attribute": "`role=button` or `nodeName=button`", "Usage": "The element should either be a `<button>` element or should have `role=\"button\"` assigned." }, { "Selector": "", "Attribute": "`aria-label`", "Usage": "The button needs an accessible name to be assigned to it." }, { "Selector": "", "Attribute": "`tabindex=-1`", "Usage": "Button element should not be focusable." }, { "Selector": "`.k-datetimepicker.k-disabled .k-button`", "Attribute": "`disabled` or `aria-disabled`", "Usage": "Attribute is rendered only when the picker is disabled." } ] } }, { "h4": "Calendar Popup" }, { "p": "The Calendar in the Popup element of the component should implement the specification for the **Calendar** component." }, { "link": { "title": "Calendar accessibility specification", "source": "{{calendar_a11y_link}}" } }, { "h4": "Popup Date/Time View Chooser" }, { "p": "The Date/Time view chooser in the Popup element of the component should implement the specification for the **ButtonGroup** component." }, { "link": { "title": "ButtonGroup accessibility specification", "source": "{{buttongroup_a11y_link}}" } }, { "h4": "TimePicker Popup" }, { "p": "Time Popup implementation should follow the specification for the TimePicker component." }, { "link": { "title": "TimePicker accessibility specification", "source": "{{timepicker_a11y_link}}" } }, { "h3": "Managing the Focus" }, { "p": "The initial focus is on the selected date." }, { "p": "Focus is trapped in the picker's popup. Meaning that once the popup is opened, Tab key will go only through its content." }, { "h3": "Keyboard Shortcuts" }, { "h4": "Actions applied to the DateInput" }, { "p": "The DateInput part of the component implements the specification for the DateInput component:" }, { "link": { "title": "DateInput specification", "source": "{{dateinput_kb_link}}" } }, { "p": "In addition to that it also features the following shortcuts:" }, { "table": { "headers": [ "Shortcut", "Behavior" ], "rows": [ { "Shortcut": "`Esc`", "Behavior": "Discards the selection and closes the popup." }, { "Shortcut": "`Enter`", "Behavior": "Enters in time edit if calendar is the target. Otherwise, accepts the selected time and closes the popup." }, { "Shortcut": "`Alt/Opt(Mac) + Down`", "Behavior": "Opens the dropdown and moves the focus to the displayed calendar." }, { "Shortcut": "`Alt/Opt(Mac) + Up`", "Behavior": "Closes the dropdown and moves the focus to the input element." } ] } }, { "h4": "Actions applied to the calendar part of the Popup" }, { "p": "Calendar navigation is handled following the Calendar component specification:" }, { "link": { "title": "Calendar specification", "source": "{{calendar_kb_link}}" } }, { "h4": "Actions applied to the time part of the Popup" }, { "p": "TimePicker navigation is handled following the TimePicker component specification:" }, { "link": { "title": "TimePicker specification", "source": "{{timepicker_kb_link}}" } }, { "h3": "Testing" }, { "p": "The DateTimePicker has been extensively tested automatically with [axe-core](https://github.com/dequelabs/axe-core) and manually with the most popular screen readers." }, { "h3": "Screen Readers" }, { "p": "The DateTimePicker has been tested with the following screen readers and browsers combinations:" }, { "table": { "headers": [ "Environment", "Tool" ], "rows": [ [ "Firefox", "NVDA" ], [ "Chrome", "JAWS" ], [ "Microsoft Edge", "JAWS" ] ] } }, { "h3": "Resources" }, { "ul": [ { "link": { "source": "https://www.w3.org/TR/wai-aria-1.2/#combobox", "title": "WAI ARIA specification for combobox" } }, { "link": { "source": "https://www.w3.org/TR/wai-aria-1.2/#spinbutton", "title": "WAI ARIA specification for spinbutton" } }, { "link": { "source": "https://www.w3.org/WAI/ARIA/apg/example-index/dialog-modal/datepicker-dialog.html", "title": "ARIA practices Date Picker Dialog Example" } }, { "link": { "source": "https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/examples/datepicker-dialog/", "title": "ARIA Authoring Practices: Date Picker Dialog" } } ] } ]