Skip to content

Commit 4369e4b

Browse files
authored
Доработки доступности (#352)
* Доработки доступности Обновляю лимиты строк, цвета и некоторые лейблы для повышения доступности * Обновил скриншоты
1 parent 419ac5c commit 4369e4b

38 files changed

+135
-33
lines changed

SwiftUI-WorkoutApp/Libraries/SWDesignSystem/Sources/SWDesignSystem/Assets.xcassets/Colors/swSmallElements.colorset/Contents.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"color-space" : "srgb",
66
"components" : {
77
"alpha" : "1.000",
8-
"blue" : "0.514",
9-
"green" : "0.514",
10-
"red" : "0.522"
8+
"blue" : "0x6E",
9+
"green" : "0x6E",
10+
"red" : "0x6E"
1111
}
1212
},
1313
"idiom" : "universal"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"colors" : [
3+
{
4+
"color" : {
5+
"color-space" : "srgb",
6+
"components" : {
7+
"alpha" : "1.000",
8+
"blue" : "0x28",
9+
"green" : "0xA1",
10+
"red" : "0x1A"
11+
}
12+
},
13+
"idiom" : "universal"
14+
},
15+
{
16+
"appearances" : [
17+
{
18+
"appearance" : "luminosity",
19+
"value" : "dark"
20+
}
21+
],
22+
"color" : {
23+
"color-space" : "srgb",
24+
"components" : {
25+
"alpha" : "1.000",
26+
"blue" : "0.451",
27+
"green" : "0.757",
28+
"red" : "0.416"
29+
}
30+
},
31+
"idiom" : "universal"
32+
}
33+
],
34+
"info" : {
35+
"author" : "xcode",
36+
"version" : 1
37+
}
38+
}

SwiftUI-WorkoutApp/Libraries/SWDesignSystem/Sources/SWDesignSystem/Localizable.xcstrings

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,22 @@
127127
}
128128
}
129129
},
130+
"ProfilePhoto" : {
131+
"localizations" : {
132+
"en" : {
133+
"stringUnit" : {
134+
"state" : "translated",
135+
"value" : "Profile photo"
136+
}
137+
},
138+
"ru" : {
139+
"stringUnit" : {
140+
"state" : "translated",
141+
"value" : "Фото профиля"
142+
}
143+
}
144+
}
145+
},
130146
"Report" : {
131147
"localizations" : {
132148
"ru" : {

SwiftUI-WorkoutApp/Libraries/SWDesignSystem/Sources/SWDesignSystem/Public/Color+.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ public extension Color {
2323
static let swDisabledButtonText = Color(.swDisabledButtonText)
2424
/// `tinted`-кнопки
2525
static let swTintedButton = Color(.swTintedButton)
26+
/// Цвет текста в `tinted`-кнопке
27+
static let swTintedButtonText = Color(.swTintedButtonText)
2628
/// Нажатые `tinted`-кнопки
2729
static let swTintedButtonPressed = Color(.swTintedButtonPressed)
2830
/// Цвет кнопки добавления фото
@@ -42,7 +44,7 @@ public extension Color {
4244
let colors: [Color] = [
4345
.swBackground, .swCardBackground, .swSmallElements, .swSeparators,
4446
.swMainText, .swAccent, .swFilledButtonText, .swFilledButtonPressed,
45-
.swDisabledButton, .swDisabledButtonText, .swTintedButton,
47+
.swDisabledButton, .swDisabledButtonText, .swTintedButton, .swTintedButtonText,
4648
.swTintedButtonPressed, .swAddPhotoButton, .swError, .swTabBar
4749
]
4850
return ScrollView {

SwiftUI-WorkoutApp/Libraries/SWDesignSystem/Sources/SWDesignSystem/Public/ContentInSheet.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ public struct ContentInSheet<Content: View>: View {
2929
private extension ContentInSheet {
3030
var headerForSheet: some View {
3131
Text(title)
32-
.lineLimit(1)
3332
.font(.headline)
3433
.foregroundStyle(Color.swMainText)
3534
.frame(maxWidth: .infinity)

SwiftUI-WorkoutApp/Libraries/SWDesignSystem/Sources/SWDesignSystem/Public/ProfileView.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,13 @@ public struct ProfileView: View {
3232
VStack(spacing: 12) {
3333
CachedImage(url: imageURL, mode: .profileAvatar)
3434
.borderedRoundedRectClipShape()
35+
.accessibilityLabel(Text("ProfilePhoto"))
3536
VStack(spacing: 8) {
3637
Text(login)
3738
.lineLimit(2)
3839
.multilineTextAlignment(.center)
3940
.foregroundStyle(Color.swMainText)
40-
.font(.system(size: 22, weight: .bold))
41+
.font(.title2.bold())
4142
VStack(alignment: .leading, spacing: 6) {
4243
HStack(spacing: 8) {
4344
Icons.Regular.person.view

SwiftUI-WorkoutApp/Libraries/SWDesignSystem/Sources/SWDesignSystem/Public/Rows/JournalRowView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public struct JournalRowView: View {
1616
titleView
1717
dateTextView
1818
}
19-
.lineLimit(1)
19+
.multilineTextAlignment(.leading)
2020
.frame(maxWidth: .infinity, alignment: .leading)
2121
menuButtonIfNeeded
2222
}

SwiftUI-WorkoutApp/Libraries/SWDesignSystem/Sources/SWDesignSystem/Public/Rows/ParkRowView.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ private extension ParkRowView {
6868
Text(text)
6969
.foregroundStyle(Color.swSmallElements)
7070
.font(.subheadline)
71-
.lineLimit(2)
7271
.multilineTextAlignment(.leading)
7372
}
7473
}

SwiftUI-WorkoutApp/Libraries/SWDesignSystem/Sources/SWDesignSystem/Public/Rows/UserRowView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ private extension UserRowView {
7676
userNameView
7777
addressViewIfAvailable
7878
}
79-
.lineLimit(1)
79+
.multilineTextAlignment(.leading)
8080
.frame(maxWidth: .infinity, alignment: .leading)
8181
}
8282
.insideCardBackground()

SwiftUI-WorkoutApp/Libraries/SWDesignSystem/Sources/SWDesignSystem/Public/SWButtonStyle.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public struct SWButtonStyle: ButtonStyle {
6363
case .filled:
6464
return .swFilledButtonText
6565
case .tinted:
66-
return .swAccent
66+
return .swTintedButtonText
6767
}
6868
}
6969

0 commit comments

Comments
 (0)