mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-26 11:30:50 +02:00
Fix voiceover support in OnboardingAvatarScreen.
This commit is contained in:
@@ -36,6 +36,10 @@ struct OnboardingAvatarViewState: BindableState {
|
||||
var buttonImage: ImageAsset {
|
||||
avatar == nil ? Asset.Images.onboardingAvatarCamera : Asset.Images.onboardingAvatarEdit
|
||||
}
|
||||
|
||||
var avatarAccessibilityLabel: String {
|
||||
avatar == nil ? VectorL10n.onboardingAvatarPlaceholderAccessibilityLabel(placeholderAvatarLetter) : VectorL10n.onboardingAvatarImageAccessibilityLabel
|
||||
}
|
||||
}
|
||||
|
||||
struct OnboardingAvatarBindings {
|
||||
|
||||
@@ -74,6 +74,9 @@ struct OnboardingAvatarScreen: View {
|
||||
.overlay(cameraButton, alignment: .bottomTrailing)
|
||||
.onTapGesture { isPresentingPickerSelection = true }
|
||||
.actionSheet(isPresented: $isPresentingPickerSelection) { pickerSelectionActionSheet }
|
||||
.accessibilityElement(children: .ignore)
|
||||
.accessibilityLabel(viewModel.viewState.avatarAccessibilityLabel)
|
||||
.accessibilityValue(VectorL10n.accessibilityButtonLabel)
|
||||
}
|
||||
|
||||
/// The button to indicate the user can tap to select an avatar
|
||||
|
||||
Reference in New Issue
Block a user