Parameters
A string that describes what happens when the user interacts with the accessibility element.
Sets a hint that describes the result of performing an action on this accessibility element.
.accessibilityHint(hint: string): Component;
Button("Delete", () => {})
.accessibilityLabel("Delete item")
.accessibilityHint("Removes this item permanently")
Image("settings-icon.png")
.accessibilityLabel("Settings")
.accessibilityHint("Opens the settings screen")
.onTapGesture(() => {
navigateToSettings()
})
Button("Submit", () => {})
.accessibilityHint("Submits the form and proceeds to the next step")
Toggle("Notifications", isOn: $notificationsEnabled)
.accessibilityHint("Toggles push notification settings")
VStack([
Image("document.pdf"),
Text("Report.pdf")
]).accessibilityLabel("PDF document")
.accessibilityHint("Double tap to open, long press for options")
.onTapGesture(() => {
openDocument()
})
.onLongPressGesture(() => {
showDocumentOptions()
})