Skip to content

Commit

Permalink
fix voice over for cancellation
Browse files Browse the repository at this point in the history
  • Loading branch information
julia-andersson committed Jan 28, 2025
1 parent b3e2d4f commit 5e38bc2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,25 @@ struct SetTerminationDateLandingScreen: View {
}
}
}
.accessibilityElement(children: .combine)
.accessibilityLabel(accessibilityLabel)
.accessibilityAddTraits(.isButton)
}
}

private var accessibilityLabel: String {
var label =
L10n.terminationFlowImportantInformationTitle + "\n" + L10n.terminationFlowImportantInformationText + "\n"
+ L10n.terminationFlowIUnderstandText + "\n"

if vm.hasAgreedToTerms {
label += L10n.voiceoverAccepted
} else {
label += L10n.voiceoverNotAccepted
}
return label
}

@hColorBuilder
func getFillColor() -> some hColor {
if vm.hasAgreedToTerms {
Expand Down
1 change: 1 addition & 0 deletions Projects/hCoreUI/Sources/Views/GeneralDatePicker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public struct DatePickerView: View {
hText(vm.dateSelected.displayDateDDMMMYYYYFormat).foregroundColor(hTextColor.Opaque.secondary)
}
}
.accessibilityElement(children: .combine)
}
}
}
Expand Down

0 comments on commit 5e38bc2

Please sign in to comment.