<!--
{
  "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(named:intent:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewP012_AppIntents_aB0E19accessibilityAction5named6intentAA15ModifiedContentVyxAA31AccessibilityAttachmentModifierVGAA4TextV_qd__t0dE00D6IntentRd__lF::OverloadGroup"
  },
  "title" : "accessibilityAction(named:intent:)"
}
-->

# accessibilityAction(named:intent:)

Adds an accessibility action labeled `name` 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>(named name: Text, 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)