Post

Accessibility

Accessibility

Source: https://developer.apple.com/tutorials/app-dev-training/creating-the-edit-view

VoiceOver reads label text + accessibility trait

1
2
3
4
Button(action: {}) {
    Image(systemName: "forward.fill")
    }
    .accessibilityLabel("Next speaker")

“Next speaker. Button.”

Omit Spacer and combine components for VoiceOver

1
2
3
4
5
6
HStack {
    Label("Length", systemImage: "clock")
    Spacer()
    Text("\(scrum.lengthInMinutes) minutes")
}
.accessibilityElement(children: .combine)

Add text info for VoiceOver

1
2
3
Slider(value: $scrum.lengthInMinutesAsDouble, in: 5...30, step: 1) {
        Text("Length")
    }
This post is licensed under CC BY 4.0 by the author.