@@ -28,54 +28,75 @@ fileprivate struct Circle: View {
28
28
struct SwiftUIView : View {
29
29
var body : some View {
30
30
VStack ( spacing: 30 ) {
31
- // View with nothing.
32
- Circle ( )
33
- . accessibility ( label: Text ( " " ) )
34
- . accessibility ( value: Text ( " " ) )
35
- . accessibility ( hint: Text ( " " ) )
36
-
37
- // View with label.
38
- Circle ( )
39
- . accessibility ( label: Text ( " Label " ) )
40
- . accessibility ( value: Text ( " " ) )
41
- . accessibility ( hint: Text ( " " ) )
42
-
43
- // View with value.
44
- Circle ( )
45
- . accessibility ( label: Text ( " " ) )
46
- . accessibility ( value: Text ( " Value " ) )
47
- . accessibility ( hint: Text ( " " ) )
48
-
49
- // View with hint.
50
- Circle ( )
51
- . accessibility ( label: Text ( " " ) )
52
- . accessibility ( value: Text ( " " ) )
53
- . accessibility ( hint: Text ( " Hint " ) )
54
-
55
- // View with label and value.
56
- Circle ( )
57
- . accessibility ( label: Text ( " Label " ) )
58
- . accessibility ( value: Text ( " Value " ) )
59
- . accessibility ( hint: Text ( " " ) )
60
-
61
- // View with label and hint.
62
- Circle ( )
63
- . accessibility ( label: Text ( " Label " ) )
64
- . accessibility ( value: Text ( " " ) )
65
- . accessibility ( hint: Text ( " Hint " ) )
66
-
67
- // View with value and hint.
68
- Circle ( )
69
- . accessibility ( label: Text ( " " ) )
70
- . accessibility ( value: Text ( " Value " ) )
71
- . accessibility ( hint: Text ( " Hint " ) )
72
-
73
- // View with label, value, and hint.
74
- Circle ( )
75
- . accessibility ( label: Text ( " Label " ) )
76
- . accessibility ( value: Text ( " Value " ) )
77
- . accessibility ( hint: Text ( " Hint " ) )
78
-
31
+ Group {
32
+ // View with nothing.
33
+ Circle ( )
34
+ . accessibility ( label: Text ( " " ) )
35
+ . accessibility ( value: Text ( " " ) )
36
+ . accessibility ( hint: Text ( " " ) )
37
+
38
+ // View with label.
39
+ Circle ( )
40
+ . accessibility ( label: Text ( " Label " ) )
41
+ . accessibility ( value: Text ( " " ) )
42
+ . accessibility ( hint: Text ( " " ) )
43
+
44
+ // View with value.
45
+ Circle ( )
46
+ . accessibility ( label: Text ( " " ) )
47
+ . accessibility ( value: Text ( " Value " ) )
48
+ . accessibility ( hint: Text ( " " ) )
49
+
50
+ // View with hint.
51
+ Circle ( )
52
+ . accessibility ( label: Text ( " " ) )
53
+ . accessibility ( value: Text ( " " ) )
54
+ . accessibility ( hint: Text ( " Hint " ) )
55
+
56
+ // View with label and value.
57
+ Circle ( )
58
+ . accessibility ( label: Text ( " Label " ) )
59
+ . accessibility ( value: Text ( " Value " ) )
60
+ . accessibility ( hint: Text ( " " ) )
61
+
62
+ // View with label and hint.
63
+ Circle ( )
64
+ . accessibility ( label: Text ( " Label " ) )
65
+ . accessibility ( value: Text ( " " ) )
66
+ . accessibility ( hint: Text ( " Hint " ) )
67
+
68
+ // View with value and hint.
69
+ Circle ( )
70
+ . accessibility ( label: Text ( " " ) )
71
+ . accessibility ( value: Text ( " Value " ) )
72
+ . accessibility ( hint: Text ( " Hint " ) )
73
+
74
+ // View with label, value, and hint.
75
+ Circle ( )
76
+ . accessibility ( label: Text ( " Label " ) )
77
+ . accessibility ( value: Text ( " Value " ) )
78
+ . accessibility ( hint: Text ( " Hint " ) )
79
+
80
+ if #available( iOS 14 . 0 , * ) {
81
+ // View with label, value, hint, and Custom Actions.
82
+ Circle ( )
83
+ . accessibility ( label: Text ( " Label " ) )
84
+ . accessibility ( value: Text ( " Value " ) )
85
+ . accessibility ( hint: Text ( " Hint " ) )
86
+ . accessibilityAction ( named: " Custom " ) { }
87
+ }
88
+
89
+ if #available( iOS 15 . 0 , * ) {
90
+ // View with label, value, hint, and Custom Content.
91
+ Circle ( )
92
+ . accessibility ( label: Text ( " Label " ) )
93
+ . accessibility ( value: Text ( " Value " ) )
94
+ . accessibility ( hint: Text ( " Hint " ) )
95
+ . accessibilityCustomContent ( " Key " , " Value " )
96
+ . accessibilityCustomContent ( " Important Key " , " Important Value " , importance: . high)
97
+ }
98
+ }
99
+
79
100
Spacer ( )
80
101
}
81
102
}
0 commit comments