OTPInput Accessibility
Out of the box, the KendoReact OTPInput provides extensive accessibility support and enables users with disabilities to acquire complete control over its features.
The OTPInput is compliant with the Web Content Accessibility Guidelines (WCAG) 2.2 AA standards and Section 508 requirements, follows the Web Accessibility Initiative - Accessible Rich Internet Applications (WAI-ARIA) best practices for implementing the keyboard navigation for its group role, provides options for managing its focus and is tested against the most popular screen readers.
WAI-ARIA
This section lists the selectors, attributes, and behavior patterns supported by the component and its composite elements.
To prevent sensitive information exposure, the
autocompleteattribute is disabled by default.
OTP Container
| Selector | Attribute | Usage |
|---|---|---|
.k-otp | role=group | Sets the proper role for the OTP. |
Hidden Value Input
The OTPInput renders a hidden <input> element that holds the aggregated value of all cells. It is invisible to assistive technologies.
| Selector | Attribute | Usage |
|---|---|---|
.k-otp > input | type=hidden | The hidden input holding the combined OTPInput value. |
.k-otp > input | aria-hidden=true | Hides the hidden input from assistive technologies. |
Input Cells
| Selector | Attribute | Usage |
|---|---|---|
.k-otp .k-otp-input > .k-input-inner | aria-label / aria-labelledby | Each cell requires an accessible name. Provide a label via the label prop or aria-label. |
.k-otp .k-otp-input > .k-input-inner | autocomplete=off | Disables browser autocomplete on individual cells by default. |
.k-otp .k-otp-input > .k-input-inner | aria-describedby | Points to the hint or error message for the OTPInput. Present only when a hint or validation error is set. |
.k-otp.k-invalid .k-otp-input > .k-input-inner, .k-otp.ng-invalid .k-otp-input > .k-input-inner | aria-invalid=true | Rendered only when the OTPInput is in a form and its value is invalid. |
.k-otp.k-disabled .k-otp-input > .k-input-inner | disabled=disabled / aria-disabled=true | Rendered only when the OTPInput is disabled. |
Resources
WAI-ARIA Authoring Practices — Group Role
Section 508
The OTPInput is fully compliant with the Section 508 requirements.
Testing
The OTPInput has been extensively tested automatically with axe-core and manually with the most popular screen readers.
To report any accessibility issues, contact the team through the Telerik Support System.
Screen Readers
The OTPInput has been tested with the following screen readers and browser combinations:
| Environment | Tool |
|---|---|
| Firefox | NVDA |
| Chrome | JAWS |
| Microsoft Edge | JAWS |
Keyboard Navigation
For more details about the OTPInput keyboard navigation, refer to the article on keyboard navigation in the OTPInput component.