Skip to main content
.accessibilityHint(hint: string): Component;

Parameters

hint
string
A string that describes what happens when the user interacts with the accessibility element.

Support

Usage

Button with action hint

Button("Delete", () => {})
    .accessibilityLabel("Delete item")
    .accessibilityHint("Removes this item permanently")
Image("settings-icon.png")
    .accessibilityLabel("Settings")
    .accessibilityHint("Opens the settings screen")
    .onTapGesture(() => {
        navigateToSettings()
    })

Form submission hint

Button("Submit", () => {})
    .accessibilityHint("Submits the form and proceeds to the next step")

Toggle with state change hint

Toggle("Notifications", isOn: $notificationsEnabled)
    .accessibilityHint("Toggles push notification settings")

Complex interaction hint

VStack([
    Image("document.pdf"),
    Text("Report.pdf")
]).accessibilityLabel("PDF document")
  .accessibilityHint("Double tap to open, long press for options")
  .onTapGesture(() => {
      openDocument()
  })
  .onLongPressGesture(() => {
      showDocumentOptions()
  })