---
title: "accessibilityAction(_:_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/modifiedcontent/accessibilityaction(_:_:)"
---

# accessibilityAction(_:_:)

Adds an accessibility action to the view. Actions allow assistive technologies, such as the VoiceOver, to interact with the view by invoking the action.

## Declaration

```swift
nonisolated func accessibilityAction(_ actionKind: AccessibilityActionKind = .default, _ handler: @escaping () -> Void) -> ModifiedContent<Content, Modifier>
```

## Discussion

Discussion For example, this is how a .default action to compose a new email could be added to a view. var body: some View {     ContentView()         .accessibilityAction {             // Handle action         } }
