---
title: "accessibilityLabel(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/text/accessibilitylabel(_:)"
---

# accessibilityLabel(_:)

Adds a label to the view that describes its contents.

## Declaration

```swift
nonisolated func accessibilityLabel(_ label: LocalizedStringResource) -> Text
```

## Parameters

- `label`: The string resource for the alternative accessibility label.

## Discussion

Discussion Use this method to provide an alternative accessibility label to the text that is displayed. For example, you can give an alternate label to a navigation title: var body: some View {     NavigationView {         ContentView()             .navigationTitle(Text("􀈤").accessibilityLabel("Inbox"))     } }

## See Also

### Providing accessibility information

- [accessibilityHeading(_:)](swiftui/text/accessibilityheading(_:).md)
- [accessibilityTextContentType(_:)](swiftui/text/accessibilitytextcontenttype(_:).md)
