Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

๐Ÿ”€ :: [#172] ํ™ˆํ™”๋ฉด ์ ‘๊ทผ์„ฑ ์ง€์› #173

Merged
merged 1 commit into from
Jan 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions Projects/Feature/MainFeature/Sources/MainView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ public struct MainView: View {
schoolInfoCardView()
.padding(.horizontal, 16)
.padding(.vertical, 12)
.accessibilityElement(children: .combine)
.accessibilityLabel("\(viewStore.school) \(viewStore.grade)ํ•™๋…„ \(viewStore.class)๋ฐ˜")
.accessibilityHint("\(viewStore.displayDate.toString()) ์ž…๋‹ˆ๋‹ค. ํ˜„์žฌ ํ•™๊ต ์ •๋ณด๋ฅผ ํ‘œ์‹œํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.")

TopTabbarView(
currentTab: viewStore.binding(
Expand All @@ -31,6 +34,8 @@ public struct MainView: View {
items: ["๊ธ‰์‹", "์‹œ๊ฐ„ํ‘œ"]
)
.padding(.top, 32)
.accessibilityLabel("๋ฉ”๋‰ด ํƒญ")
.accessibilityHint("๊ธ‰์‹๊ณผ ์‹œ๊ฐ„ํ‘œ ์ค‘ ์›ํ•˜๋Š” ๋ฉ”๋‰ด๋ฅผ ์„ ํƒํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.")

ZStack(alignment: .bottomTrailing) {
TabView(
Expand Down Expand Up @@ -72,9 +77,12 @@ public struct MainView: View {
.overlay {
Image(systemName: "arrow.down.to.line")
.foregroundColor(.extraWhite)
.accessibilityHidden(true)
}
}
.padding([.bottom, .trailing], 16)
.accessibilityLabel("์ƒˆ ๋ฒ„์ „ ์—…๋ฐ์ดํŠธ")
.accessibilityHint("์•ฑ์Šคํ† ์–ด๋กœ ์ด๋™ํ•˜์—ฌ ์ƒˆ ๋ฒ„์ „์„ ์„ค์น˜ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค")
}
}
}
Expand All @@ -84,6 +92,7 @@ public struct MainView: View {
Text("ONMI")
.font(.custom("Fraunces9pt-Black", size: 32))
.foregroundColor(.extraBlack)
.accessibilityHidden(true)
}

ToolbarItemGroup(placement: .navigationBarTrailing) {
Expand All @@ -92,14 +101,20 @@ public struct MainView: View {
} label: {
Image.bellBadge
.renderingMode(.original)
.accessibilityHidden(true)
}
.accessibilityLabel("์•Œ๋ฆผ")
.accessibilityHint("์•Œ๋ฆผ ๋ชฉ๋ก์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค")

Button {
viewStore.send(.settingButtonDidTap)
} label: {
Image.gear
.renderingMode(.original)
.accessibilityHidden(true)
}
.accessibilityLabel("์„ค์ •")
.accessibilityHint("์•ฑ ์„ค์ •์„ ๋ณ€๊ฒฝํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค")
}
}
.onAppear {
Expand All @@ -124,6 +139,7 @@ public struct MainView: View {
let dateString = "\(viewStore.displayDate.toString())"
Text("\(gradeClassString) โ€ข \(dateString)")
.twFont(.body2, color: .textSecondary)
.accessibilitySortPriority(3)
}

Spacer()
Expand All @@ -140,11 +156,13 @@ public struct MainView: View {
.transition(
.move(edge: .top).combined(with: .opacity)
)
.accessibilityHidden(true)
} else {
Image.book
.transition(
.move(edge: .bottom).combined(with: .opacity)
)
.accessibilityHidden(true)
}
}
.padding(.trailing, 10)
Expand Down
16 changes: 16 additions & 0 deletions Projects/Feature/MealFeature/Sources/MealView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,26 @@ public struct MealView: View {
ProgressView()
.progressViewStyle(.automatic)
.padding(.top, 16)
.accessibilityLabel("๊ธ‰์‹ ์ •๋ณด๋ฅผ ๋ถˆ๋Ÿฌ์˜ค๋Š” ์ค‘์ž…๋‹ˆ๋‹ค")
.accessibilitySortPriority(1)
} else if viewStore.meal?.isEmpty ?? true,
date.weekday == 7 || date.weekday == 1,
userDefaultsClient.getValue(.isSkipWeekend) as? Bool ?? false {
Text("์ฃผ๋ง์—๋„ ์›”์š”์ผ ๊ธ‰์‹์„ ๋ณด๊ณ  ์‹ถ๋‹ค๋ฉด?")
.foregroundColor(.textSecondary)
.accessibilityLabel("์ฃผ๋ง ๊ธ‰์‹ ์„ค์ • ์•ˆ๋‚ด")
.accessibilitySortPriority(1)

TWButton(title: "์„ค์ •ํ•˜๋Ÿฌ๊ฐ€๊ธฐ", style: .cta) {
viewStore.send(.settingsButtonDidTap)
}
.accessibilityHint("์ฃผ๋ง ๊ธ‰์‹ ํ‘œ์‹œ ์„ค์ •์„ ๋ณ€๊ฒฝํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค")
.accessibilitySortPriority(2)
} else {
Text("๋“ฑ๋ก๋œ ์ •๋ณด๋ฅผ ์ฐพ์ง€ ๋ชปํ–ˆ์–ด์š” ๐Ÿ˜ฅ")
.padding(.top, 16)
.accessibilityLabel("๊ธ‰์‹ ์ •๋ณด๋ฅผ ์ฐพ์„ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค")
.accessibilitySortPriority(1)
}
}
.onAppear {
Expand All @@ -65,6 +73,9 @@ public struct MealView: View {
.padding(.top, 16)
.padding(.horizontal, 16)
.id(type)
.accessibilityElement(children: .combine)
.accessibilityLabel("\(type.display) ๋ฉ”๋‰ด, \(String(format: "%.1f", subMeal.cal)) ์นผ๋กœ๋ฆฌ")
.accessibilitySortPriority(1)

LazyVStack {
ForEach(subMeal.meals, id: \.hashValue) { meal in
Expand All @@ -77,6 +88,7 @@ public struct MealView: View {
if isMealContainsAllergy(meal: meal) {
Image.allergy
.renderingMode(.original)
.accessibilityHidden(true)
}
}
.padding(.horizontal, 12)
Expand All @@ -87,6 +99,10 @@ public struct MealView: View {
.fill(Color.cardBackground)
}
.padding(.horizontal, 16)
.accessibilityElement(children: .combine)
.accessibilityLabel("\(mealDisplay(meal: meal))")
.accessibilityHint(isMealContainsAllergy(meal: meal) ? "์•Œ๋ ˆ๋ฅด๊ธฐ ์œ ๋ฐœ ์‹ํ’ˆ์ด ํฌํ•จ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค" : "")
.accessibilitySortPriority(2)
}
}
.padding(.bottom, 24)
Expand Down
10 changes: 10 additions & 0 deletions Projects/Feature/TimeTableFeature/Sources/TimeTableView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,16 @@ public struct TimeTableView: View {
Text("์˜ค๋Š˜ ์‹œ๊ฐ„ํ‘œ๋ฅผ ์ฐพ์„ ์ˆ˜ ์—†์–ด์š”!")
.padding(.top, 16)
.foregroundColor(.textSecondary)
.accessibilityLabel("์‹œ๊ฐ„ํ‘œ๋ฅผ ์ฐพ์„ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค")
.accessibilitySortPriority(1)

if Date().month == 3 {
Text("3์›” ์ดˆ์ค‘๋ฐ˜์—๋Š” neis์— ์ •๊ทœ์‹œ๊ฐ„ํ‘œ๊ฐ€\n ๋“ฑ๋ก๋˜์–ด์žˆ์ง€ ์•Š์„ ์ˆ˜๋„ ์žˆ์–ด์š”.")
.multilineTextAlignment(.center)
.padding(.top, 14)
.foregroundColor(.textSecondary)
.accessibilityLabel("3์›” ์ดˆ์ค‘๋ฐ˜์—๋Š” ์ •๊ทœ์‹œ๊ฐ„ํ‘œ๊ฐ€ ๋“ฑ๋ก๋˜์–ด ์žˆ์ง€ ์•Š์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค")
.accessibilitySortPriority(2)
}
}

Expand All @@ -32,6 +36,8 @@ public struct TimeTableView: View {
ProgressView()
.progressViewStyle(.automatic)
.padding(.top, 16)
.accessibilityLabel("์‹œ๊ฐ„ํ‘œ๋ฅผ ๋ถˆ๋Ÿฌ์˜ค๋Š” ์ค‘์ž…๋‹ˆ๋‹ค")
.accessibilitySortPriority(1)
}

LazyVStack(spacing: 8) {
Expand Down Expand Up @@ -63,6 +69,7 @@ public struct TimeTableView: View {
Divider()
.foregroundColor(.unselectedSecondary)
.frame(height: 18)
.accessibilityHidden(true)

Text(timeTable.content)
.twFont(.headline4, color: .textPrimary)
Expand All @@ -77,5 +84,8 @@ public struct TimeTableView: View {
Color.cardBackground
}
.cornerRadius(8)
.accessibilityElement(children: .combine)
.accessibilityLabel("\(timeTable.perio)๊ต์‹œ \(timeTable.content)")
.accessibilitySortPriority(2)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public struct TopTabbarView: View {
.frame(height: 2)
.matchedGeometryEffect(id: "TAB", in: tabAnimation, properties: .position)
.offset(y: 0.5)
.accessibilityHidden(true)
}
}
.frame(maxWidth: .infinity)
Expand All @@ -40,13 +41,17 @@ public struct TopTabbarView: View {
}
.padding(.horizontal, 16)
}
.accessibilityLabel("\(items[index]), \(currentTab == index ? "์„ ํƒ๋จ" : "์„ ํƒ์•ˆ๋จ")")
.accessibilityAddTraits(currentTab == index ? .isSelected : [])
.accessibilitySortPriority(1)
}
}
.background(alignment: .bottom) {
Rectangle()
.frame(maxWidth: .infinity)
.foregroundColor(.unselectedSecondary)
.frame(height: 1)
.accessibilityHidden(true)
}
}
}
Loading