Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
What’s New in Accessibility WWDC21
Search
Jierong Li
June 28, 2021
Programming
350
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
What’s New in Accessibility WWDC21
Jierong Li
June 28, 2021
More Decks by Jierong Li
See All by Jierong Li
一般的な通信でも使える バックグラウンドURLSessionの活用方法 / How to use background URLSession for general network data transfer tasks.
myihsan
0
3k
Multi-Module 101
myihsan
0
360
Hierarchical Structure について / About Hierarchical Structure
myihsan
1
530
Property WrapperでDecodableのデフォルト値を設定 / Providing Default Value for Decodable Property by Property Wrapper
myihsan
1
370
モックフレームワーク比較 / Mocking Framework Comparison
myihsan
0
560
Other Decks in Programming
See All in Programming
PHP初心者セッション2026 〜生成AIでは見えない裏側を知る:今だからLAMPを通して仕組みを学ぶ〜
kashioka
0
640
What's New in Android 2026
veronikapj
0
140
Built Our Own Background Agent at LayerX #aidevex_findy
layerx
PRO
8
3.1k
Prismを使った型安全な暗号化_関数型まつり2026
_fhhmm
0
150
任せる範囲はこう広がった / How the Scope of AI Delegation Has Expanded
nrslib
1
270
AI駆動開発を妨げる技術的負債の解消アプローチ / ai-refactoring-approach
minodriven
17
9.3k
The Bowling Game- From Imperative to Functional Programming - Part 1
philipschwarz
PRO
0
340
AIキャラアプリkaiwaの低遅延音声通話基盤をどう作ったか - AWS Gravitonで支える低遅延・低コストAI Agent基盤
mogamit
0
180
使用 Meilisearch 建立新聞搜尋工具
johnroyer
0
170
Welcome to the "Parametricity" 🏙️ − Generic だけど Specific な世界 −
guvalif
PRO
1
180
AWS CDK を「作」ってみた 〜フルスクラッチで見えた CDK の裏側〜 / aws-cdk-from-scratch
gotok365
3
500
数百円から始めるRuby電子工作
tarosay
0
100
Featured
See All Featured
So, you think you're a good person
axbom
PRO
2
2.1k
Tell your own story through comics
letsgokoyo
1
1k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
350
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
330
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
310
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.8k
It's Worth the Effort
3n
188
29k
Abbi's Birthday
coloredviolet
3
8.8k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
Transcript
WHAT’S NEW IN ACCESSIBILITY YUMEMI.SWIFT #12 FEAT. HAKATA.SWIFT 〜WWDC RECAP~
⾃⼰紹介 JIERONG LI (李) ▸ 株式会社ゆめみ ▸ iOSエンジニア ▸ KMMでAndroid開発キャッチアップ
▸ 永遠にリリースできず個⼈開発 ▸ https://jierong.dev
COVERED SESSIONS ▸ SwiftUI Accessibility: Beyond the basics ▸ Bring
accessibility to charts in your app
PREVIEW WITHOUT RUNNING APP
CUSTOM VIEW IMPLEMENTATION SegmentedControl( selectedSegmentIndex: $selectedSegmentIndex ) { HStack {
Image(systemName: "tray.full") Text("Inbox") Spacer() Text("\(tasks.count)") } HStack { Image(systemName: "archivebox") Text("Done") } }
CUSTOM VIEW ACCESSIBILITY PREVIEW ▸ Inbox Icon ▸ Label: Inbox
Full ▸ Traits: .isImage ▸ Inbox Text ▸ Label: Inbox ▸ Traits: .isStaticText ▸ Count ▸ Label: 5 ▸ Traits: .isStaticText ▸ Done Icon ▸ Label: Archive ▸ Traits: .isImage ▸ Done Text ▸ Label: Done ▸ Traits: .isStaticText
CUSTOM VIEW EXPECTED ▸ Inbox ▸ Label: Inbox 5 ▸
Traits: .isButton .isSelected ▸ Done ▸ Label: Done ▸ Traits: .isButton
CUSTOM VIEW BELOW IOS 15 SegmentedControl( selectedSegmentIndex: $selectedSegmentIndex ) {
HStack { Image(systemName: "tray.full") Text("Inbox") Spacer() Text("\(tasks.count)") } ... }
CUSTOM VIEW BELOW IOS 15 SegmentedControl( selectedSegmentIndex: $selectedSegmentIndex ) {
HStack { Image(systemName: "tray.full") Text("Inbox") Spacer() Text("\(tasks.count)") } .accessibilityElement(children: .ignore) ... }
CUSTOM VIEW BELOW IOS 15 SegmentedControl( selectedSegmentIndex: $selectedSegmentIndex ) {
HStack { Image(systemName: "tray.full") Text("Inbox") Spacer() Text("\(tasks.count)") } .accessibilityElement(children: .ignore) .accessibility(label: Text(“\(tasks.count)”)) ... }
CUSTOM VIEW BELOW IOS 15 SegmentedControl( selectedSegmentIndex: $selectedSegmentIndex ) {
HStack { Image(systemName: "tray.full") Text("Inbox") Spacer() Text("\(tasks.count)") } .accessibilityElement(children: .ignore) .accessibility(label: Text(“\(tasks.count)”)) .accessibility(addTraits: selectedSegmentIndex == 0 ? [.isButton, .isSelected] : [.isButton] ) ... }
CUSTOM VIEW IOS 15 AND ABOVE SegmentedControl( selectedSegmentIndex: $selectedSegmentIndex )
{ HStack { Image(systemName: "tray.full") Text("Inbox") Spacer() Text("\(tasks.count)") } HStack { Image(systemName: "archivebox") Text("Done") } }
CUSTOM VIEW IOS 15 AND ABOVE SegmentedControl( selectedSegmentIndex: $selectedSegmentIndex )
{ HStack { Image(systemName: "tray.full") Text("Inbox") Spacer() Text("\(tasks.count)") } HStack { Image(systemName: "archivebox") Text("Done") } } .accessibilityRepresentation { Picker("", selection: $selectedSegmentIndex) { Text("Inbox \(tasks.count)").tag(0) Text("Done").tag(1) } .pickerStyle(.segmented) }
EXTERNAL VIEW (CHARTVIEW) BELOW IOS 15 BarChart() .data(dataSet.map(\.value)) .chartStyle(chartStyle) 🤷
EXTERNAL VIEW (CHARTVIEW) IOS 15 AND ABOVE BarChart() .data(dataSet.map(\.value)) .chartStyle(chartStyle)
EXTERNAL VIEW (CHARTVIEW) IOS 15 AND ABOVE BarChart() .data(dataSet.map(\.value)) .chartStyle(chartStyle)
.accessibilityChildren { HStack { ForEach(dataSet) { data in Rectangle() .accessibilityLabel(data.label) .accessibilityValue("\(data.value)") } } }
ROTOR BELOW IOS 15 UIKit Only
ROTOR IOS 15 AND ABOVE VStack { ForEach(lines) { line
in Text(line.content) } } .accessibilityRotor("Titles") { ForEach(lines) { line in if line.isTitle { AccessibilityRotorEntry( line.content, id: line.id ) } } }
ROTOR IOS 15 AND ABOVE VStack { ForEach(lines) { line
in Text(line.content) } } .accessibilityRotor(.headings) { ForEach(lines) { line in if line.isTitle { AccessibilityRotorEntry( line.content, id: line.id ) } } }
CONTROL FOCUS @ACCESSIBILITYFOCUSSTATE @AccessibilityFocusState var isFocused: Bool
CONTROL FOCUS @ACCESSIBILITYFOCUSSTATE struct NotificationBanner: View { @Binding var notification:
Notification? @State var timer: Timer? @AccessibilityFocusState var isNotificationFocused: Bool var body: some View { content .accessibilityFocused(isNotificationFocused) } func startTimer() { timer = Timer.scheduledTimer( withTimeInterval: 3, repeats: true) { _ in if !isNotificationFocused { notification = nil } } } }
AUDIO GRAPH AXCHART protocol AXChart: NSObjectProtocol { var accessibilityChartDescriptor: AXChartDescriptor?
{ get set } }
AUDIO GRAPH AXCHART protocol AXChart: NSObjectProtocol { var accessibilityChartDescriptor: AXChartDescriptor?
{ get set } } class AXChartDescription: NSObject { convenience init( title: String? = nil, summary: String? = nil, xAxis: AXDataAxisDescriptor, yAxis: AXNumericDataAxisDescriptor? = nil, additionalAxes: [AXDataAxisDescriptor] = [], series: [AXDataSeriesDescriptor] ) ... }
ご清聴ありがとうございました