<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/accessibilityAction(_:intent:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewP012_AppIntents_aB0E19accessibilityAction_6intentAA15ModifiedContentVyxAA31AccessibilityAttachmentModifierVGAA0kG4KindV_qd__t0dE00D6IntentRd__lF"
  },
  "title" : "accessibilityAction(_:intent:)"
}
-->

# accessibilityAction(_:intent:)

Adds an accessibility action representing `actionKind` to the view.
Actions allow assistive technologies, such as the VoiceOver, to interact
with the view by invoking the action. When the action is performed,
the `intent` will be invoked.

```
nonisolated func accessibilityAction<I>(_ actionKind: AccessibilityActionKind = .default, intent: I) -> ModifiedContent<Self, AccessibilityAttachmentModifier> where I : AppIntent
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)