File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,7 @@ class SingleOtpInput extends PureComponent<*> {
84
84
disabledStyle,
85
85
shouldAutoFocus,
86
86
isInputNum,
87
+ index,
87
88
value,
88
89
className,
89
90
...rest
@@ -95,7 +96,7 @@ class SingleOtpInput extends PureComponent<*> {
95
96
style = { { display : 'flex' , alignItems : 'center' } }
96
97
>
97
98
< input
98
- aria-label = { `Verification code ${ isInputNum ? 'digit ' : 'character' } ` }
99
+ aria-label = { `${ ( index === 0 ) ? 'Please enter verification code. ' : '' } ${ isInputNum ? 'Digit ' : 'Character' } n° ${ index + 1 } ` }
99
100
autoComplete = "off"
100
101
style = { Object . assign (
101
102
{ width : '1em' , textAlign : 'center' } ,
@@ -298,6 +299,7 @@ class OtpInput extends Component<Props, State> {
298
299
< SingleOtpInput
299
300
placeholder = { placeholder && placeholder [ i ] }
300
301
key = { i }
302
+ index = { i }
301
303
focus = { activeInput === i }
302
304
value = { otp && otp [ i ] }
303
305
onChange = { this . handleOnChange }
You can’t perform that action at this time.
0 commit comments