UNPKG

@progress/wct-a11y-spec

Version:

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

262 lines 8.57 kB
[ { "h2": "Accessibility Support" }, { "p": "Out of the box, the Telerik and Kendo UI Prompt Box provides extensive accessibility support and enables users with disabilities to acquire complete control over its features." }, { "p": "The Prompt Box 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": "Prompt Box Component" }, { "p": "The Prompt Box is an input component designed for AI-assisted interactions. It supports single-line and multi-line text input modes, and integrates with the Speech-to-Text Button component." }, { "h4": "Input Field" }, { "h5": "Single-line Input" }, { "table": { "headers": [ "Selector", "Attribute", "Usage" ], "rows": [ { "Selector": "`.k-prompt-box-singleline .k-prompt-box-input`", "Attribute": "`nodeName=input`", "Usage": "Ensures the input field has the proper textbox role." }, { "Selector": "", "Attribute": "`aria-label` or `aria-labelledby`", "Usage": "Provides an accessible label for the input. Use `aria-label` or associate with a visible label via `aria-labelledby`." }, { "Selector": "", "Attribute": "`placeholder`", "Usage": "Provides a short hint to the user about the expected input. Should not replace proper labeling." } ] } }, { "h5": "Multi-line Textarea" }, { "table": { "headers": [ "Selector", "Attribute", "Usage" ], "rows": [ { "Selector": "`.k-prompt-box-multiline .k-prompt-box-textarea`", "Attribute": "`nodeName=textarea`", "Usage": "Ensures the textarea has the proper textbox role." }, { "Selector": "", "Attribute": "`aria-label` or `aria-labelledby`", "Usage": "Provides an accessible label for the textarea. Use `aria-label` or associate with a visible label via `aria-labelledby`." }, { "Selector": "", "Attribute": "`placeholder`", "Usage": "Provides a short hint to the user about the expected input. Should not replace proper labeling." }, { "Selector": "", "Attribute": "`aria-multiline=true`", "Usage": "Indicates the textarea supports multiple lines of text." } ] } }, { "h4": "Prompt Box Affixes" }, { "p": "The Prompt Box can have prefix and suffix elements containing buttons and icons." }, { "table": { "headers": [ "Selector", "Attribute", "Usage" ], "rows": [ { "Selector": "`.k-prompt-box-affix .k-button`", "Attribute": "`role=button` or `nodeName=button`", "Usage": "Buttons in affixes must have appropriate role." }, { "Selector": "", "Attribute": "`aria-label`", "Usage": "Affix buttons must be properly labelled to describe their function." } ] } }, { "h4": "Send/Submit Button" }, { "p": "The primary action button for submitting the prompt or stopping generation." }, { "table": { "headers": [ "Selector", "Attribute", "Usage" ], "rows": [ { "Selector": "`.k-prompt-box-affix .k-button:has(.k-svg-i-arrow-up-outline), .k-prompt-box-affix .k-button:has(.k-svg-i-stop-sm)`", "Attribute": "`aria-live=polite`", "Usage": "The send button renders the aria-live attribute to announce the change in status." }, { "Selector": "", "Attribute": "`aria-label`", "Usage": "The send button is labelled to indicate its current action (e.g., 'Send prompt' or 'Stop generating')." } ] } }, { "h4": "Speech-to-Text Button" }, { "link": { "title": "Speech-to-Text Button accessibility specification", "source": "{{speechtotextbutton_a11y_link}}" } }, { "h3": "Managing the Focus" }, { "p": "Focusable elements in the Prompt Box are part of the page tabsequence. Those are:" }, { "ul": [ "`.k-prompt-box-input` (single-line mode);", "`.k-prompt-box-textarea` (multi-line and auto modes);", "all `.k-prompt-box-affix button` elements;" ] }, { "h3": "Keyboard Shortcuts" }, { "p": "This section lists the keyboard shortcuts supported by the Prompt Box component." }, { "table": { "headers": [ "Shortcut", "Behavior" ], "rows": [ { "Shortcut": "`Enter` / `Return`", "Behavior": "Submits the prompt." }, { "Shortcut": "`Shift` + `Enter` / `Return`", "Behavior": "Inserts a new line in multi-line and auto modes" }, { "Shortcut": "`Tab`", "Behavior": "Moves focus to the next focusable element" }, { "Shortcut": "`Shift` + `Tab`", "Behavior": "Moves focus to the previous focusable element" } ] } }, { "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}}" } }, { "h3": "Testing" }, { "p": "The Prompt Box 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 Prompt Box 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" } } ] } ]