Skip to content

Commit 3506533

Browse files
Merge pull request #6908 from syncfusion-content/BLAZ-983104-otp-input
Updated the UG Documentation for otpinput
2 parents 08f35ac + 9ef269e commit 3506533

File tree

9 files changed

+78
-77
lines changed

9 files changed

+78
-77
lines changed

blazor/otp-input/accessibility.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,40 +9,40 @@ documentation: ug
99

1010
# Accessibility in Blazor OTP Input component
1111

12-
The Blazor OTP Input component followed the accessibility guidelines and standards, including [ADA](https://www.ada.gov/), [Section 508](https://www.section508.gov/), [WCAG 2.2](https://www.w3.org/TR/WCAG22/) standards, and [WCAG roles](https://www.w3.org/TR/wai-aria/#roles) that are commonly used to evaluate accessibility.
12+
The Blazor OTP Input component follows established accessibility guidelines and standards, including [ADA](https://www.ada.gov/), [Section 508](https://www.section508.gov/), [WCAG 2.2](https://www.w3.org/TR/WCAG22/), and [WCAG roles](https://www.w3.org/TR/wai-aria/#roles) that are commonly used to evaluate accessibility.
1313

1414
The accessibility compliance for the Blazor OTP Input component is outlined below.
1515

1616
| Accessibility Criteria | Compatibility |
1717
| -- | -- |
18-
| [WCAG 2.2 Support](../common/accessibility#accessibility-standards) | <img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Yes"> |
19-
| [Section 508 Support](../common/accessibility#accessibility-standards) | <img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Yes"> |
20-
| [Screen Reader Support](../common/accessibility#screen-reader-support) | <img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Yes"> |
21-
| [Right-To-Left Support](../common/accessibility#right-to-left-support) | <img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Yes"> |
22-
| [Color Contrast](../common/accessibility#color-contrast) | <img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Yes"> |
23-
| [Mobile Device Support](../common/accessibility#mobile-device-support) | <img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Yes"> |
24-
| [Keyboard Navigation Support](../common/accessibility#keyboard-navigation-support) | <img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Yes"> |
18+
| [WCAG 2.2 Support](../common/accessibility#accessibility-standards) | <img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Supported"> |
19+
| [Section 508 Support](../common/accessibility#accessibility-standards) | <img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Supported"> |
20+
| [Screen Reader Support](../common/accessibility#screen-reader-support) | <img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Supported"> |
21+
| [Right-To-Left Support](../common/accessibility#right-to-left-support) | <img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Supported"> |
22+
| [Color Contrast](../common/accessibility#color-contrast) | <img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Supported"> |
23+
| [Mobile Device Support](../common/accessibility#mobile-device-support) | <img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Supported"> |
24+
| [Keyboard Navigation Support](../common/accessibility#keyboard-navigation-support) | <img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Supported"> |
2525

2626
<style>
2727
.post .post-content img {
2828
display: inline-block;
2929
margin: 0.5em 0;
3030
}
3131
</style>
32-
<div><img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Yes"> - All features of the component meet the requirement.</div>
32+
<div><img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Supported"> - All features of the component meet the requirement.</div>
3333

34-
<div><img src="https://cdn.syncfusion.com/content/images/landing-page/intermediate.png" alt="Intermediate"> - Some features of the component do not meet the requirement.</div>
34+
<div><img src="https://cdn.syncfusion.com/content/images/landing-page/intermediate.png" alt="Partially supported"> - Some features of the component do not fully meet the requirement.</div>
3535

36-
<div><img src="https://cdn.syncfusion.com/content/images/landing-page/no.png" alt="No"> - The component does not meet the requirement.</div>
36+
<div><img src="https://cdn.syncfusion.com/content/images/landing-page/no.png" alt="Not supported"> - The component does not meet the requirement.</div>
3737

3838
## WAI-ARIA attributes
3939

4040
The following ARIA attributes are used in the OTP Input component:
4141

4242
| Attributes | Purpose |
4343
| ------------ | ----------------------- |
44-
| `role=group` | Attributes used to form a collection of items.|
45-
| `aria-label` | Attributes provides the text label for the OTP Inputs. |
44+
| `role=group` | Applied to the container to group the OTP input fields. |
45+
| `aria-label` | Provides a text label for the OTP input fields for assistive technologies. |
4646

4747
## Keyboard interaction
4848

@@ -51,7 +51,7 @@ The following keyboard shortcuts are supported by the OTP Input component.
5151
| Windows | Mac | Actions |
5252
| --- | --- | --- |
5353
| <kbd>←</kbd> | <kbd>←</kbd> | Focuses the previous input in the OTP. |
54-
| <kbd>→</kbd> | <kbd>→</kbd> | Focuses the next input in OTP |
54+
| <kbd>→</kbd> | <kbd>→</kbd> | Focuses the next input in the OTP. |
5555
| <kbd>Tab</kbd> | <kbd>Tab</kbd> | Moves the initial focus and shifts focus to the next input of the OTP. |
5656
| <kbd>Shift</kbd> + <kbd>Tab</kbd> | <kbd>⇧</kbd> + <kbd>Tab</kbd> | Moves the focus to the previous input of the OTP. |
5757

@@ -61,7 +61,7 @@ The following keyboard shortcuts are supported by the OTP Input component.
6161

6262
## HtmlAttributes
6363

64-
HtmlAttributes allow you to specify additional HTML attributes to be applied to the OTP input component.
64+
HtmlAttributes allow specifying additional HTML attributes to be applied to the OTP input component for improved semantics and accessibility.
6565

6666
You can pass HTML attributes as key-value pairs to the [HtmlAttributes](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfOtpInput.html#Syncfusion_Blazor_Inputs_SfOtpInput_HtmlAttributes) property.
6767

@@ -82,8 +82,9 @@ You can pass HTML attributes as key-value pairs to the [HtmlAttributes](https://
8282

8383
## AriaLabels
8484

85-
AriaLabels define the ARIA-label attribute for each input field in the OTP input component. ARIA-labels enhance accessibility by providing descriptive labels for screen reader users, improving the user experience for individuals with disabilities.
86-
You can provide an array of strings as ARIA-labels to the [AriaLabels](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfOtpInput.html#Syncfusion_Blazor_Inputs_SfOtpInput_AriaLabels) property. Each string corresponds to the ARIA-label attribute for the respective input field in the OTP input component.
85+
AriaLabels define the aria-label attribute for each input field in the OTP input component. aria-label values enhance accessibility by providing descriptive labels for screen reader users.
86+
87+
You can provide an array of strings as aria-label values to the [AriaLabels](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfOtpInput.html#Syncfusion_Blazor_Inputs_SfOtpInput_AriaLabels) property. Each string corresponds to the aria-label attribute for the respective input field in the OTP input component.
8788

8889
```cshtml
8990

blazor/otp-input/appearance.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ documentation: ug
99

1010
# Appearance in Blazor OTP Input component
1111

12-
You can also customize the appearance of OTP Input component.
12+
Customize the appearance of the OTP input component, including input length, disabled state, and visual styles.
1313

1414
## Setting input length
1515

16-
You can specify the length of OTP by using the [Length](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfOtpInput.html#Syncfusion_Blazor_Inputs_SfOtpInput_Length) property. The default value is `4`.
16+
Specify the length of the OTP by using the [Length](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfOtpInput.html#Syncfusion_Blazor_Inputs_SfOtpInput_Length) property. The default value is `4`. This value determines the number of input fields rendered for the OTP.
1717

1818
```cshtml
1919
@@ -27,7 +27,7 @@ You can specify the length of OTP by using the [Length](https://help.syncfusion.
2727

2828
## Disable inputs
2929

30-
You can disable the OTP Input component by using the [Disabled](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfOtpInput.html#Syncfusion_Blazor_Inputs_SfOtpInput_Disabled) property. By default the value is `false`.
30+
Disable the OTP Input component by using the [Disabled](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfOtpInput.html#Syncfusion_Blazor_Inputs_SfOtpInput_Disabled) property. By default, the value is `false`. When disabled, the input fields are non-interactive and display the disabled visual style.
3131

3232
```cshtml
3333
@@ -41,9 +41,9 @@ You can disable the OTP Input component by using the [Disabled](https://help.syn
4141

4242
## CssClass
4343

44-
You can customize the appearance of the OTP Input component, such as by changing its colors, fonts, sizes or other visual aspects by using the [CssClass](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfOtpInput.html#Syncfusion_Blazor_Inputs_SfOtpInput_CssClass) property.
44+
Customize the appearance of the OTP Input component by changing colors, fonts, sizes, and other visual aspects by using the [CssClass](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfOtpInput.html#Syncfusion_Blazor_Inputs_SfOtpInput_CssClass) property.
4545

46-
The OTP input component supports the following predefined styles that can be defined using the `CssClass` property. You can customize by replacing the `CssClass` property with the below defined class names.
46+
The OTP input component supports the following predefined styles that can be applied using the `CssClass` property. Replace the `CssClass` value with one of the following class names to apply the corresponding style.
4747

4848
| cssClass | Description |
4949
| -------- | -------- |
@@ -59,4 +59,4 @@ The OTP input component supports the following predefined styles that can be def
5959
6060
```
6161

62-
![Blazor OTP Input Component with CssClass](images/blazor-otp-success.png)
62+
![Blazor OTP Input Component with CssClass](images/blazor-otp-success.png)

blazor/otp-input/events.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ documentation: ug
99

1010
# Events in Blazor OTP Input component
1111

12-
This section describes the OTP Input events that will be triggered when appropriate actions are performed. The following events are available in the OTP Input component.
12+
This section describes the OTP Input events triggered by user interaction and component lifecycle. The following events are available in the OTP Input component.
1313

1414
## Created
1515

16-
The OTP Input component triggers the [Created](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfOtpInput.html#Syncfusion_Blazor_Inputs_SfOtpInput_Created) event when the component rendering is completed.
16+
The OTP Input component triggers the [Created](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfOtpInput.html#Syncfusion_Blazor_Inputs_SfOtpInput_Created) event when component rendering is completed.
1717

1818
```cshtml
1919
@@ -30,9 +30,9 @@ The OTP Input component triggers the [Created](https://help.syncfusion.com/cr/bl
3030
3131
```
3232

33-
## OnFocus
33+
## OnFocus
3434

35-
The OTP Input component triggers the [OnFocus](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfOtpInput.html#Syncfusion_Blazor_Inputs_SfOtpInput_OnFocus) event when the OTP Input is focused. The [OtpFocusInEventArgs](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.OtpFocusInEventArgs.html) passed as an event argument provides the details of the focus event.
35+
The OTP Input component triggers the [OnFocus](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfOtpInput.html#Syncfusion_Blazor_Inputs_SfOtpInput_OnFocus) event when an OTP input field receives focus. The [OtpFocusInEventArgs](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.OtpFocusInEventArgs.html) event argument provides details about the focus-in action, such as the focused input.
3636

3737
```cshtml
3838
@@ -51,7 +51,7 @@ The OTP Input component triggers the [OnFocus](https://help.syncfusion.com/cr/bl
5151

5252
## OnBlur
5353

54-
The OTP Input component triggers the [OnBlur](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfOtpInput.html#Syncfusion_Blazor_Inputs_SfOtpInput_OnBlur) event when the OTP Input is focused out. The [OtpFocusOutEventArgs](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.OtpFocusOutEventArgs.html) passed as an event argument provides the details of the blur event.
54+
The OTP Input component triggers the [OnBlur](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfOtpInput.html#Syncfusion_Blazor_Inputs_SfOtpInput_OnBlur) event when focus leaves an OTP input field or the component. The [OtpFocusOutEventArgs](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.OtpFocusOutEventArgs.html) event argument provides details about the blur action, such as the input that lost focus.
5555

5656
```cshtml
5757
@@ -70,7 +70,7 @@ The OTP Input component triggers the [OnBlur](https://help.syncfusion.com/cr/bla
7070

7171
## OnInput
7272

73-
The OTP Input component triggers the [OnInput](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfOtpInput.html#Syncfusion_Blazor_Inputs_SfOtpInput_OnInput) event when the value of each OTP Input is changed. The [OtpInputEventArgs](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.OtpInputEventArgs.html) passed as an event argument provides the details of the each value is changed.
73+
The OTP Input component triggers the [OnInput](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfOtpInput.html#Syncfusion_Blazor_Inputs_SfOtpInput_OnInput) event when the value of an individual OTP input field changes. The [OtpInputEventArgs](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.OtpInputEventArgs.html) event argument provides details about the change, such as the input index and the current value.
7474

7575
```cshtml
7676
@@ -85,4 +85,4 @@ The OTP Input component triggers the [OnInput](https://help.syncfusion.com/cr/bl
8585
}
8686
}
8787
88-
```
88+
```

0 commit comments

Comments
 (0)