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

# accessibilityHeading(_:)

Sets the accessibility level of this heading.

## Declaration

```swift
nonisolated func accessibilityHeading(_ level: AccessibilityHeadingLevel) -> Text
```

## Parameters

- `level`: The heading level to associate with this element from the available doc://com.apple.SwiftUI/documentation/SwiftUI/AccessibilityHeadingLevel levels.

## Discussion

Discussion Use this modifier to set the level of this heading in relation to other headings. The system speaks the level number of levels AccessibilityHeadingLevel.h1 through AccessibilityHeadingLevel.h6 alongside the text. The default heading level if you don’t use this modifier is AccessibilityHeadingLevel.unspecified.

## See Also

### Providing accessibility information

- [accessibilityLabel(_:)](swiftui/text/accessibilitylabel(_:).md)
- [accessibilityTextContentType(_:)](swiftui/text/accessibilitytextcontenttype(_:).md)
