Skip to content

Commit d56b4aa

Browse files
authored
chore(ui-react-native): Fix accessibility audit issues (#3042)
1 parent f41a013 commit d56b4aa

File tree

18 files changed

+546
-443
lines changed

18 files changed

+546
-443
lines changed

packages/react-native/src/Authenticator/Defaults/ConfirmResetPassword/__tests__/__snapshots__/ConfirmResetPassword.spec.tsx.snap

Lines changed: 64 additions & 50 deletions
Large diffs are not rendered by default.

packages/react-native/src/Authenticator/Defaults/ConfirmSignIn/__tests__/__snapshots__/ConfirmSignIn.spec.tsx.snap

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,6 @@ Array [
3131
}
3232
>
3333
<View
34-
accessibilityLabel="Code"
35-
accessibilityState={
36-
Object {
37-
"disabled": false,
38-
}
39-
}
40-
accessible={true}
4134
style={
4235
Array [
4336
Object {
@@ -48,8 +41,10 @@ Array [
4841
},
4942
]
5043
}
44+
testID="amplify__text-field-container"
5145
>
5246
<Text
47+
accessibilityLabel="Code"
5348
accessibilityRole="text"
5449
style={
5550
Array [
@@ -75,6 +70,7 @@ Array [
7570
Code
7671
</Text>
7772
<View
73+
accessible={true}
7874
style={
7975
Object {
8076
"alignItems": "center",
@@ -83,12 +79,16 @@ Array [
8379
"borderWidth": 1,
8480
"flexDirection": "row",
8581
"paddingHorizontal": 8,
86-
"paddingVertical": 12,
8782
}
8883
}
8984
testID="amplify__text-field__input-container"
9085
>
9186
<TextInput
87+
accessibilityState={
88+
Object {
89+
"disabled": false,
90+
}
91+
}
9292
accessible={true}
9393
autoCapitalize="none"
9494
editable={true}
@@ -103,6 +103,7 @@ Array [
103103
"color": "hsl(210, 50%, 10%)",
104104
"flexGrow": 1,
105105
"fontSize": 16,
106+
"paddingVertical": 12,
106107
},
107108
Object {},
108109
]
@@ -309,13 +310,6 @@ Array [
309310
}
310311
>
311312
<View
312-
accessibilityLabel="Code"
313-
accessibilityState={
314-
Object {
315-
"disabled": false,
316-
}
317-
}
318-
accessible={true}
319313
style={
320314
Array [
321315
Object {
@@ -326,8 +320,10 @@ Array [
326320
},
327321
]
328322
}
323+
testID="amplify__text-field-container"
329324
>
330325
<Text
326+
accessibilityLabel="Code"
331327
accessibilityRole="text"
332328
style={
333329
Array [
@@ -353,6 +349,7 @@ Array [
353349
Code
354350
</Text>
355351
<View
352+
accessible={true}
356353
style={
357354
Object {
358355
"alignItems": "center",
@@ -361,12 +358,16 @@ Array [
361358
"borderWidth": 1,
362359
"flexDirection": "row",
363360
"paddingHorizontal": 8,
364-
"paddingVertical": 12,
365361
}
366362
}
367363
testID="amplify__text-field__input-container"
368364
>
369365
<TextInput
366+
accessibilityState={
367+
Object {
368+
"disabled": false,
369+
}
370+
}
370371
accessible={true}
371372
autoCapitalize="none"
372373
editable={true}
@@ -381,6 +382,7 @@ Array [
381382
"color": "hsl(210, 50%, 10%)",
382383
"flexGrow": 1,
383384
"fontSize": 16,
385+
"paddingVertical": 12,
384386
},
385387
Object {},
386388
]

packages/react-native/src/Authenticator/Defaults/ConfirmSignUp/__tests__/__snapshots__/ConfirmSignUp.spec.tsx.snap

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ Array [
132132
},
133133
null,
134134
null,
135-
Object {},
135+
Object {
136+
"margin": 16,
137+
},
136138
]
137139
}
138140
>
@@ -287,7 +289,9 @@ Array [
287289
},
288290
null,
289291
null,
290-
Object {},
292+
Object {
293+
"margin": 16,
294+
},
291295
]
292296
}
293297
>
@@ -495,7 +499,9 @@ Array [
495499
},
496500
null,
497501
null,
498-
Object {},
502+
Object {
503+
"margin": 16,
504+
},
499505
]
500506
}
501507
>

packages/react-native/src/Authenticator/Defaults/ResetPassword/__tests__/__snapshots__/ResetPassword.spec.tsx.snap

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,6 @@ Array [
3131
}
3232
>
3333
<View
34-
accessibilityLabel="Username"
35-
accessibilityState={
36-
Object {
37-
"disabled": false,
38-
}
39-
}
40-
accessible={true}
4134
style={
4235
Array [
4336
Object {
@@ -48,8 +41,10 @@ Array [
4841
},
4942
]
5043
}
44+
testID="amplify__text-field-container"
5145
>
5246
<Text
47+
accessibilityLabel="Username"
5348
accessibilityRole="text"
5449
style={
5550
Array [
@@ -75,6 +70,7 @@ Array [
7570
Username
7671
</Text>
7772
<View
73+
accessible={true}
7874
style={
7975
Object {
8076
"alignItems": "center",
@@ -83,12 +79,16 @@ Array [
8379
"borderWidth": 1,
8480
"flexDirection": "row",
8581
"paddingHorizontal": 8,
86-
"paddingVertical": 12,
8782
}
8883
}
8984
testID="amplify__text-field__input-container"
9085
>
9186
<TextInput
87+
accessibilityState={
88+
Object {
89+
"disabled": false,
90+
}
91+
}
9292
accessible={true}
9393
autoCapitalize="none"
9494
editable={true}
@@ -103,6 +103,7 @@ Array [
103103
"color": "hsl(210, 50%, 10%)",
104104
"flexGrow": 1,
105105
"fontSize": 16,
106+
"paddingVertical": 12,
106107
},
107108
Object {},
108109
]
@@ -309,13 +310,6 @@ Array [
309310
}
310311
>
311312
<View
312-
accessibilityLabel="Username"
313-
accessibilityState={
314-
Object {
315-
"disabled": false,
316-
}
317-
}
318-
accessible={true}
319313
style={
320314
Array [
321315
Object {
@@ -326,8 +320,10 @@ Array [
326320
},
327321
]
328322
}
323+
testID="amplify__text-field-container"
329324
>
330325
<Text
326+
accessibilityLabel="Username"
331327
accessibilityRole="text"
332328
style={
333329
Array [
@@ -353,6 +349,7 @@ Array [
353349
Username
354350
</Text>
355351
<View
352+
accessible={true}
356353
style={
357354
Object {
358355
"alignItems": "center",
@@ -361,12 +358,16 @@ Array [
361358
"borderWidth": 1,
362359
"flexDirection": "row",
363360
"paddingHorizontal": 8,
364-
"paddingVertical": 12,
365361
}
366362
}
367363
testID="amplify__text-field__input-container"
368364
>
369365
<TextInput
366+
accessibilityState={
367+
Object {
368+
"disabled": false,
369+
}
370+
}
370371
accessible={true}
371372
autoCapitalize="none"
372373
editable={true}
@@ -381,6 +382,7 @@ Array [
381382
"color": "hsl(210, 50%, 10%)",
382383
"flexGrow": 1,
383384
"fontSize": 16,
385+
"paddingVertical": 12,
384386
},
385387
Object {},
386388
]

packages/react-native/src/Authenticator/Defaults/SetupTOTP/__tests__/__snapshots__/SetupTOTP.spec.tsx.snap

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,6 @@ Array [
3131
}
3232
>
3333
<View
34-
accessibilityLabel="Code"
35-
accessibilityState={
36-
Object {
37-
"disabled": false,
38-
}
39-
}
40-
accessible={true}
4134
style={
4235
Array [
4336
Object {
@@ -48,8 +41,10 @@ Array [
4841
},
4942
]
5043
}
44+
testID="amplify__text-field-container"
5145
>
5246
<Text
47+
accessibilityLabel="Code"
5348
accessibilityRole="text"
5449
style={
5550
Array [
@@ -75,6 +70,7 @@ Array [
7570
Code
7671
</Text>
7772
<View
73+
accessible={true}
7874
style={
7975
Object {
8076
"alignItems": "center",
@@ -83,12 +79,16 @@ Array [
8379
"borderWidth": 1,
8480
"flexDirection": "row",
8581
"paddingHorizontal": 8,
86-
"paddingVertical": 12,
8782
}
8883
}
8984
testID="amplify__text-field__input-container"
9085
>
9186
<TextInput
87+
accessibilityState={
88+
Object {
89+
"disabled": false,
90+
}
91+
}
9292
accessible={true}
9393
autoCapitalize="none"
9494
editable={true}
@@ -103,6 +103,7 @@ Array [
103103
"color": "hsl(210, 50%, 10%)",
104104
"flexGrow": 1,
105105
"fontSize": 16,
106+
"paddingVertical": 12,
106107
},
107108
Object {},
108109
]
@@ -309,13 +310,6 @@ Array [
309310
}
310311
>
311312
<View
312-
accessibilityLabel="Code"
313-
accessibilityState={
314-
Object {
315-
"disabled": false,
316-
}
317-
}
318-
accessible={true}
319313
style={
320314
Array [
321315
Object {
@@ -326,8 +320,10 @@ Array [
326320
},
327321
]
328322
}
323+
testID="amplify__text-field-container"
329324
>
330325
<Text
326+
accessibilityLabel="Code"
331327
accessibilityRole="text"
332328
style={
333329
Array [
@@ -353,6 +349,7 @@ Array [
353349
Code
354350
</Text>
355351
<View
352+
accessible={true}
356353
style={
357354
Object {
358355
"alignItems": "center",
@@ -361,12 +358,16 @@ Array [
361358
"borderWidth": 1,
362359
"flexDirection": "row",
363360
"paddingHorizontal": 8,
364-
"paddingVertical": 12,
365361
}
366362
}
367363
testID="amplify__text-field__input-container"
368364
>
369365
<TextInput
366+
accessibilityState={
367+
Object {
368+
"disabled": false,
369+
}
370+
}
370371
accessible={true}
371372
autoCapitalize="none"
372373
editable={true}
@@ -381,6 +382,7 @@ Array [
381382
"color": "hsl(210, 50%, 10%)",
382383
"flexGrow": 1,
383384
"fontSize": 16,
385+
"paddingVertical": 12,
384386
},
385387
Object {},
386388
]

0 commit comments

Comments
 (0)