UNPKG

@progress/wct-a11y-spec

Version:

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

400 lines 13.5 kB
[ { "h2": "Accessibility Support" }, { "p": "Out of the box, the Telerik and Kendo UI SmartBox provides extensive accessibility support and enables users with disabilities to acquire complete control over its features." }, { "p": "The SmartBox 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": "SmartBox Component" }, { "p": "The SmartBox is an AI-enhanced input component that provides intelligent suggestions and autocomplete functionality. It extends the standard input component with a popup suggestion list and optional prefix/suffix elements." }, { "table": { "headers": [ "Selector", "Attribute", "Usage" ], "rows": [ { "Selector": "`.k-smart-box .k-input-inner`", "Attribute": "`role=combobox`", "Usage": "Announces the combobox role for the SmartBox input." }, { "Selector": "", "Attribute": "`aria-label` or `aria-labelledby`", "Usage": "Provides an accessible label for the SmartBox (e.g., 'AI-powered search')." }, { "Selector": "", "Attribute": "`aria-expanded=true/false`", "Usage": "Indicates whether the suggestion popup is currently visible." }, { "Selector": "", "Attribute": "`aria-haspopup=listbox`", "Usage": "Indicates that the SmartBox has a popup listbox with suggestions." }, { "Selector": "", "Attribute": "`aria-controls`", "Usage": "References the ID of the popup listbox element when the popup is open." }, { "Selector": "", "Attribute": "`aria-autocomplete`", "Usage": "Indicates the autocomplete behavior of the input field." }, { "Selector": "", "Attribute": "`aria-activedescendant`", "Usage": "When the popup is open and keyboard navigation is active, references the ID of the currently focused list item." } ] } }, { "h4": "Prefix and Suffix Elements" }, { "p": "The SmartBox supports prefix and suffix areas for icons and buttons (e.g., AI sparkles icon, microphone button, send button)." }, { "table": { "headers": [ "Selector", "Attribute", "Usage" ], "rows": [ { "Selector": "`.k-smart-box .k-input-prefix .k-icon`", "Attribute": "`aria-hidden=true`", "Usage": "Decorative icons in the prefix area are hidden from screen readers." }, { "Selector": "`.k-smart-box .k-input-suffix .k-button`", "Attribute": "`aria-label`", "Usage": "Suffix buttons must have accessible labels describing their function (e.g., 'Start voice input', 'Send prompt')." } ] } }, { "h4": "Send Button" }, { "p": "The primary action button for submitting the input or stopping processing." }, { "table": { "headers": [ "Selector", "Attribute", "Usage" ], "rows": [ { "Selector": "`.k-smart-box-send`", "Attribute": "`aria-label`", "Usage": "The send button must be labelled to indicate its current action (e.g., 'Send' or 'Stop processing')." }, { "Selector": "`.k-smart-box-send.k-disabled`", "Attribute": "`disabled` or `aria-disabled=true`", "Usage": "Indicates the button is disabled when there is no input or processing is not active." }, { "Selector": "`.k-smart-box-send.k-processing`", "Attribute": "`aria-pressed=true`", "Usage": "Indicates that processing is in progress. The button changes function to stop processing." } ] } }, { "h4": "Live Region Announcements" }, { "p": "When suggestions are loaded or processing completes, screen readers should be notified." }, { "table": { "headers": [ "Selector", "Attribute", "Usage" ], "rows": [ { "Selector": "`[data-suggestions-status]`", "Attribute": "`aria-live=polite`", "Usage": "Use a visually hidden live region to announce status changes (e.g., 'X suggestions available', 'Processing complete')." }, { "Selector": "", "Attribute": "`aria-atomic=true`", "Usage": "Determines whether the entire region is announced on updates." } ] } }, { "h4": "Speech-to-Text Button" }, { "link": { "title": "Speech-to-Text Button accessibility specification", "source": "{{speechtotextbutton_a11y_link}}" } }, { "h4": "Popup List" }, { "p": "The suggestion popup follows the List accessibility specification. When open, the popup renders a listbox with option items." }, { "link": { "title": "List accessibility specification", "source": "{{list_a11y_link}}" } }, { "link": { "title": "Popup accessibility specification", "source": "{{popup_a11y_link}}" } }, { "h4": "Segmented Control" }, { "p": "When present in the popup, the segmented control follows the Segmented Control accessibility specification." }, { "link": { "title": "Segmented Control accessibility specification", "source": "{{segmentedcontrol_a11y_link}}" } }, { "h4": "Button Component" }, { "link": { "title": "Button accessibility specification", "source": "{{button_a11y_link}}" } }, { "h3": "Managing the Focus" }, { "p": "Focusable elements in the Smart Box are part of the page tabsequence. Those are:" }, { "ul": [ "`.k-smart-box .k-input-inner` (the main input field);", "all `.k-input-suffix button` elements (microphone, send button);" ] }, { "h3": "Keyboard Shortcuts" }, { "p": "This section lists the keyboard shortcuts supported by the Smart Box component." }, { "h4": "Button Component" }, { "link": { "title": "Button specification", "source": "{{button_kb_link}}" } }, { "h4": "Speech-to-Text Button Component" }, { "link": { "title": "Speech-to-Text Button specification", "source": "{{speechtotextbutton_kb_link}}" } }, { "h4": "List Component" }, { "link": { "title": "List specification", "source": "{{list_kb_link}}" } }, { "h3": "Keyboard Shortcuts applicable to the `.k-smart-box .k-input-inner` element" }, { "table": { "headers": [ "Shortcut", "Behavior" ], "rows": [ { "Shortcut": "`Down Arrow`", "Behavior": "Opens the suggestion popup if closed, or moves focus to the next suggestion in the list." }, { "Shortcut": "`Up Arrow`", "Behavior": "Opens the suggestion popup if closed, or moves focus to the previous suggestion in the list." }, { "Shortcut": "`Enter` / `Return`", "Behavior": "Selects the currently highlighted suggestion (if any) and submits the input." }, { "Shortcut": "`Escape`", "Behavior": "Closes the suggestion popup if open, or clears the input field." }, { "Shortcut": "`Home`", "Behavior": "When the popup is open, moves focus to the first suggestion in the list." }, { "Shortcut": "`End`", "Behavior": "When the popup is open, moves focus to the last suggestion in the list." }, { "Shortcut": "`Alt + Down Arrow`", "Behavior": "Opens the suggestion popup (alternative method)." }, { "Shortcut": "`Alt + Up Arrow`", "Behavior": "Closes the suggestion popup (alternative method)." } ] } }, { "h3": "Keyboard Shortcuts applicable to the `.k-input-suffix button` elements" }, { "table": { "headers": [ "Shortcut", "Behavior" ], "rows": [ { "Shortcut": "`Enter` / `Space`", "Behavior": "Triggers a click action on the button (e.g., start voice input, send input, stop processing)." } ] } }, { "h3": "Keyboard Shortcuts applicable to suggestion list items (`.k-list-item`)" }, { "table": { "headers": [ "Shortcut", "Behavior" ], "rows": [ { "Shortcut": "`Down Arrow`", "Behavior": "Moves focus to the next suggestion in the list." }, { "Shortcut": "`Up Arrow`", "Behavior": "Moves focus to the previous suggestion in the list." }, { "Shortcut": "`Home`", "Behavior": "Moves focus to the first suggestion in the list." }, { "Shortcut": "`End`", "Behavior": "Moves focus to the last suggestion in the list." }, { "Shortcut": "`Enter`", "Behavior": "Selects the focused suggestion and closes the popup." }, { "Shortcut": "`Escape`", "Behavior": "Closes the popup and returns focus to the input field." } ] } }, { "h3": "Testing" }, { "p": "The SmartBox 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 SmartBox 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/WAI/ARIA/apg/patterns/", "title": "ARIA Authoring Practices Guide" } }, { "link": { "source": "https://www.w3.org/WAI/ARIA/apg/patterns/combobox/", "title": "ARIA Authoring Practices: Combobox Pattern" } } ] } ]