|
| 1 | +--- |
| 2 | +title: Overview |
| 3 | +page_title: OTPInput Documentation | OTPInput Accessibility |
| 4 | +description: "Get started with the {{ site.product }} OTPInput and learn about its accessibility support for WAI-ARIA, Section 508, and WCAG 2.2." |
| 5 | +slug: accessibility_otpinputhelper |
| 6 | +position: 1 |
| 7 | +--- |
| 8 | + |
| 9 | +# OTPInput Accessibility |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | +Out of the box, the Kendo UI for jQuery OTP provides extensive accessibility support and enables users with disabilities to acquire complete control over its features. |
| 16 | + |
| 17 | + |
| 18 | +The OTP is compliant with the [Web Content Accessibility Guidelines (WCAG) 2.2 AA](https://www.w3.org/TR/WCAG22/) standards and [Section 508](https://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 and is tested against the most popular screen readers. |
| 19 | + |
| 20 | +## WAI-ARIA |
| 21 | + |
| 22 | + |
| 23 | +This section lists the selectors, attributes, and behavior patterns supported by the component and its composite elements, if any. |
| 24 | + |
| 25 | + |
| 26 | +No role attribute is implemented as the `html input type="text"` element is sufficient for defining the purpose of the component. |
| 27 | + |
| 28 | +| Selector | Attribute | Usage | |
| 29 | +| -------- | --------- | ----- | |
| 30 | +| `.k-otp` | `role=group` | Sets the proper role for the OTP. | |
| 31 | +| `.k-otp>input` | `type=hidden` | The hidden input holding the OTP inputs value. | |
| 32 | +| | `aria-hidden=true` | Hides the hidden input from assistive technologies. | |
| 33 | +| `.k-otp-input .k-input-inner` | `label for` or `aria-label` or `aria-labelledby` | The input needs an accessible name to be assigned to it. | |
| 34 | +| | `aria-required=true` | The attribute is rendered only when the OTP is in a `form` HTML element and announces the required state of the component. | |
| 35 | +| | `aria-describedby=.k-form-hint id/.k-form-error id` | 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. | |
| 36 | +| | `autocomplete=off` | Sets the default autocomplete for the input. | |
| 37 | +| `.k-invalid .k-input-inner,.ng-invalid .k-input-inner` | `aria-invalid=true` | The attribute is rendered only when the OTP is in a form and announces the valid state of the component. | |
| 38 | +| `.k-disabled .k-input-inner` | `disabled=disabled` or `aria-disabled=true` | The attribute is rendered only when the OTP is disabled. | |
| 39 | + |
| 40 | +## Resources |
| 41 | + |
| 42 | +[WAI-ARIA Specification for the TextBox](https://www.w3.org/TR/wai-aria-1.2/#textbox) |
| 43 | + |
| 44 | +## Section 508 |
| 45 | + |
| 46 | + |
| 47 | +The OTP is fully compliant with the [Section 508 requirements](http://www.section508.gov/). |
| 48 | + |
| 49 | +## Testing |
| 50 | + |
| 51 | + |
| 52 | +The OTP has been extensively tested automatically with [axe-core](https://github.com/dequelabs/axe-core) and manually with the most popular screen readers. |
| 53 | + |
| 54 | +> To report any accessibility issues, contact the team through the [Telerik Support System](https://www.telerik.com/account/support-center). |
| 55 | +
|
| 56 | +### Screen Readers |
| 57 | + |
| 58 | + |
| 59 | +The OTP has been tested with the following screen readers and browsers combinations: |
| 60 | + |
| 61 | +| Environment | Tool | |
| 62 | +| ----------- | ---- | |
| 63 | +| Firefox | NVDA | |
| 64 | +| Chrome | JAWS | |
| 65 | +| Microsoft Edge | JAWS | |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | +### Test Example |
| 70 | +To test the OTPInput component, refer to the [OTPInput Accessibility Demo](https://demos.telerik.com/{{ site.platform }}/accessibility/otpinput). |
| 71 | +## Keyboard Navigation |
| 72 | +For details on how the OTPInput keyboard navigation works, refer to the [OTPInput Keyboard Navigation]({%slug keynav_otpinputhelper %}) article. |
| 73 | +## See Also |
| 74 | +* [Keyboard Navigation by the OTPInput for {{ site.framework }} (Demo)](https://demos.telerik.com/{{ site.platform }}/otpinput/keyboard-navigation) |
| 75 | +* [Keyboard Navigation by the OTPInput for {{ site.framework }}]({% slug keynav_otpinputhelper %}) |
| 76 | +* [Accessibility in {{ site.product }}]({%slug overview_accessibility%}) |
0 commit comments