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

🔀 :: [#174] 학교 설정 화면 접근성 지원 #175

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
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,15 @@ public struct SchoolMajorSheetView: View {
schoolMajorRowView(major: major)
}
.padding(.horizontal, 32)
.accessibilityElement(children: .combine)
.accessibilityLabel("\(major) \(viewStore.selectedMajor == major ? "선택됨" : "선택안됨")")
.accessibilityHint("이 학과를 선택하려면 두 번 탭하세요")
.accessibilityAddTraits(viewStore.selectedMajor == major ? .isSelected : [])
}
}
}
.padding(.top, 32)
.accessibilityLabel("학과 선택 목록")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
}

public var body: some View {
WithViewStore(store, observe: { $0 }) { viewStore in

Check warning on line 30 in Projects/Feature/SchoolSettingFeature/Sources/SchoolSettingView.swift

View workflow job for this annotation

GitHub Actions / swiftlint

Multiple Closures with Trailing Closure Violation: Trailing closure syntax should not be used when passing more than one closure argument (multiple_closures_with_trailing_closure)
ZStack {
VStack(spacing: 16) {
if !viewStore.isFocusedSchool {
Expand All @@ -35,10 +35,13 @@
VStack(alignment: .leading, spacing: 4) {
Text(viewStore.titleMessage)
.twFont(.headline2, color: .extraBlack)
.accessibilityLabel(viewStore.titleMessage)
.accessibilityAddTraits(.isHeader)

if !viewStore.class.isEmpty && !viewStore.schoolMajorList.isEmpty {
Text("학과는 없으면 안해도 괜찮아요!")
.twFont(.body3, color: .extraBlack)
.accessibilityLabel("학과 입력은 선택사항입니다")
}
}

Expand All @@ -56,6 +59,8 @@
)
)
.disabled(true)
.accessibilityLabel("학과 선택")
.accessibilityHint("학과를 선택하려면 두 번 탭하세요")
}
.padding(.bottom, 16)
.onTapGesture {
Expand All @@ -78,6 +83,8 @@
.focused($focusField, equals: .class)
.keyboardType(.numberPad)
.padding(.bottom, 16)
.accessibilityLabel("반 입력")
.accessibilityHint("숫자로 반을 입력해주세요")
}

if viewStore.selectedSchool != nil {
Expand All @@ -93,6 +100,8 @@
.focused($focusField, equals: .grade)
.keyboardType(.numberPad)
.padding(.bottom, 16)
.accessibilityLabel("학년 입력")
.accessibilityHint("숫자로 학년을 입력해주세요")
}
}

Expand All @@ -106,11 +115,14 @@
focusField = .school
}
.focused($focusField, equals: .school)
.accessibilityLabel("학교 이름 입력")
.accessibilityHint("학교 이름을 입력하면 검색 결과가 나타납니다")

if viewStore.isFocusedSchool {
if viewStore.isLoading {
ProgressView()
.progressViewStyle(.automatic)
.accessibilityLabel("학교 검색 중")
} else {
ScrollView {
LazyVStack(spacing: 16) {
Expand All @@ -128,9 +140,13 @@
viewStore.send(.schoolRowDidSelect(school), animation: .default)
focusField = .grade
}
.accessibilityElement(children: .combine)
.accessibilityLabel("\(school.name) \(school.location)")
.accessibilityHint("이 학교를 선택하려면 두 번 탭하세요")
}
}
}
.accessibilityLabel("검색된 학교 목록")
}
}

Expand Down Expand Up @@ -160,6 +176,8 @@
viewStore.send(.nextButtonDidTap, animation: .default)
focusField = nil
}
.accessibilityLabel(viewStore.nextButtonTitle)
.accessibilityHint("입력한 정보로 설정을 완료 혹은 다음 단계로 넘어갑니다")
}
}
}
Expand Down
Loading