File tree Expand file tree Collapse file tree 7 files changed +36
-14
lines changed
Anytype/Sources/PresentationLayer
AuthNew/Join/JoinView/JoinSelectionView
RoundedTextFieldWithTitle
Modules/DesignKit/Sources/DesignKit/Components Expand file tree Collapse file tree 7 files changed +36
-14
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ struct JoinSelectionView: View {
40
40
}
41
41
)
42
42
. disabled ( model. selectedOptions. isEmpty)
43
+ . accessibilityLabel ( " Continue " )
43
44
44
45
StandardButton (
45
46
Loc . skip,
@@ -48,6 +49,7 @@ struct JoinSelectionView: View {
48
49
model. onSkipAction ( )
49
50
}
50
51
)
52
+ . accessibilityLabel ( " Skip " )
51
53
}
52
54
}
53
55
}
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ struct PageNavigationBackButton: View {
21
21
. if ( pageNavigationHiddenBackButton) {
22
22
$0. hidden ( )
23
23
}
24
+ . accessibilityLabel ( " NavigationBack " )
24
25
}
25
26
}
26
27
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ struct FramedTextField<LeadingView: View>: View {
32
32
if let title {
33
33
AnytypeText ( title, style: . uxCalloutRegular)
34
34
. foregroundColor ( . Text. secondary)
35
+ . accessibilityLabel ( " Title " )
35
36
}
36
37
37
38
HStack ( alignment: . center, spacing: 8 ) {
@@ -68,6 +69,7 @@ struct FramedTextField<LeadingView: View>: View {
68
69
RoundedRectangle ( cornerRadius: 26 )
69
70
. stroke ( Color . Shape. transperentSecondary, lineWidth: 1 )
70
71
)
72
+ . accessibilityLabel ( " TextFieldContainer " )
71
73
}
72
74
}
73
75
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ struct SpaceCreateView: View {
27
27
axis: . vertical,
28
28
text: $model. spaceName
29
29
)
30
+ . accessibilityLabel ( " SpaceNameTextField " )
30
31
31
32
if !FeatureFlags. spaceUxTypes {
32
33
SectionHeaderView ( title: Loc . typeLabel)
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import DesignKit
5
5
6
6
struct SpaceHubView : View {
7
7
@StateObject private var model : SpaceHubViewModel
8
- @StateObject var spaceCreationTip = SpaceCreationTipWrapper ( )
9
8
10
9
@State private var draggedSpace : ParticipantSpaceViewDataWithPreview ?
11
10
@State private var draggedInitialIndex : Int ?
@@ -27,6 +26,7 @@ struct SpaceHubView: View {
27
26
SpaceDeleteAlert ( spaceId: spaceId. value)
28
27
}
29
28
. handleChatCreationTip ( )
29
+ . accessibilityLabel ( " SpaceHub " )
30
30
}
31
31
32
32
@ViewBuilder
@@ -119,21 +119,9 @@ struct SpaceHubView: View {
119
119
}
120
120
121
121
ToolbarItem ( placement: . topBarTrailing) {
122
- Button {
123
- spaceCreationTip. invalidate ( )
122
+ SpaceHubNewSpaceButton {
124
123
model. onTapCreateSpace ( )
125
124
}
126
- label: {
127
- Image ( asset: . X32. addFilled)
128
- . foregroundStyle ( Color . Control. secondary)
129
- . frame ( width: 32 , height: 32 )
130
- . overlay ( alignment: . bottomLeading) {
131
- if spaceCreationTip. shouldDisplay {
132
- AttentionDotView ( )
133
- }
134
- }
135
- . padding ( . vertical, 6 )
136
- }
137
125
}
138
126
}
139
127
Original file line number Diff line number Diff line change
1
+ import SwiftUI
2
+
3
+ struct SpaceHubNewSpaceButton : View {
4
+
5
+ @StateObject var spaceCreationTip = SpaceCreationTipWrapper ( )
6
+
7
+ let onTap : ( ) -> Void
8
+
9
+ var body : some View {
10
+ Button {
11
+ spaceCreationTip. invalidate ( )
12
+ onTap ( )
13
+ }
14
+ label: {
15
+ Image ( asset: . X32. addFilled)
16
+ . foregroundStyle ( Color . Control. secondary)
17
+ . frame ( width: 32 , height: 32 )
18
+ . overlay ( alignment: . bottomLeading) {
19
+ if spaceCreationTip. shouldDisplay {
20
+ AttentionDotView ( )
21
+ }
22
+ }
23
+ . padding ( . vertical, 6 )
24
+ }
25
+ . accessibilityLabel ( " NewSpaceButton " )
26
+ }
27
+ }
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ public struct AnytypeTextField: View {
23
23
}
24
24
. font ( AnytypeFontBuilder . font ( anytypeFont: font) )
25
25
. kerning ( font. config. kern)
26
+ . accessibilityLabel ( " TextField " )
26
27
}
27
28
}
28
29
}
You can’t perform that action at this time.
0 commit comments