-
맞춤형 제어 항목의 접근성 향상하기
누구나 앱을 이용할 수 있도록 하여 앱에 포함된 인터랙티브 요소의 잠재력을 최대한 실현하세요. VoiceOver 및 기타 보조 기술로 사용자들이 제어 항목을 어떻게 이해하고 사용하는지 자세히 살펴봅니다. 동작, 패스스루 제스처, 직접 터치와 같은 다양한 입력 방법을 알아봅니다. 각각의 접근성 경험을 개선하고 향상해 나가는 과정을 통해 다양한 예시 제어 항목을 자세히 살펴보세요.
챕터
- 0:01 - Introduction
- 1:02 - Guiding principles
- 8:41 - Complex controls
리소스
관련 비디오
WWDC24
-
비디오 검색…
-
-
5:01 - Improve accessibility for coffee dispenser
// Improve accessibility for coffee dispenser import SwiftUI struct CoffeeDispenserView: View { @State var coffee: Double = 0.0 var body: some View { CoffeeSlider(value: coffee) .accessibilityElement() .accessibilityLabel("Coffee Dispenser") .accessibilityValue("\(Int(coffee)) ounces") .accessibilityAddTraits(.adjustable) .accessibilityAdjustableAction { direction in switch direction { case .increment: increaseCoffeeAmount() case .decrement: decreaseCoffeeAmount() } } } } -
7:05 - Set the accessibility activation point
// Set the accessibility activation point import SwiftUI struct CoffeeDispenserView: View { @State var coffee: Double = 0.0 var body: some View { CoffeeSlider(value: coffee) .accessibilityActivationPoint( UnitPoint(x: 0.5, y: 1 - coffee) ) } } -
7:27 - Post accessibility announcements
// Post accessibility announcements import SwiftUI struct CoffeeDispenserView: View { @State var coffee: Double = 0.0 var body: some View { CoffeeSlider(value: coffee) // ... .onChange(of: coffee) { _, newValue in if sufficientTimeSinceLastAnnouncement() && valueHasChanged() { cacheLastSpokenValue(newValue) AccessibilityNotification .Announcement(newValue) .post() } } } } -
10:13 - Add custom actions
// Add custom actions import SwiftUI struct EqualizerView: View { var body: some View { EqualizerPad() .accessibilityActions("Move Up") { increaseY(by: 10) } .accessibilityActions("Move Right") { increaseX(by: 10) } .accessibilityActions("Move Down") { decreaseY(by: 10) } .accessibilityActions("Move Left") { decreaseX(by: 10) } } } -
12:47 - Customize accessibility for the interactive cat surface
// Customize accessibility for the interactive cat surface import SwiftUI struct VirtualCat: View { var cat: CatModel var body: some View { InteractiveCatSurface() .accessibilityLabel("Virtual Cat") .accessibilityValue(cat.currentReaction.description) .accessibilityDirectTouch([.requiresActivation]) } }
-
-
- 0:01 - Introduction
Why custom controls need accessibility support so everyone can use what your app was built to do, and what the session covers — guiding principles and how to apply them to complex controls.
- 1:02 - Guiding principles
Create accessible custom controls by translating implicit visual cues into explicit information for assistive technologies. Apply labels, values, traits, and actions to ensure these controls are universally understood and actionable by everyone.
- 8:41 - Complex controls
Complex controls, like multi-dimensional pads and highly interactive virtual surfaces, demand advanced accessibility techniques beyond basic labels and values. Implementing features like passthrough gestures, custom actions, and the Direct Touch API allows people to seamlessly navigate and interact with these interfaces.