<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/AttributeScopes/AccessibilityAttributes/HeadingLevelAttribute",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Foundation",
      "Accessibility"
    ],
    "preciseIdentifier" : "s:10Foundation15AttributeScopesO13AccessibilityE0D10AttributesV012HeadingLevelB0O"
  },
  "title" : "AttributeScopes.AccessibilityAttributes.HeadingLevelAttribute"
}
-->

# AttributeScopes.AccessibilityAttributes.HeadingLevelAttribute

An attribute for the level of this heading.

```
@frozen enum HeadingLevelAttribute
```

## Overview

Assistive technologies can use this property to improve
navigation and describe the level number of levels
[`AttributeScopes.AccessibilityAttributes.HeadingLevelAttribute.HeadingLevel.h1`](/documentation/Foundation/AttributeScopes/AccessibilityAttributes/HeadingLevelAttribute/HeadingLevel/h1) through [`AttributeScopes.AccessibilityAttributes.HeadingLevelAttribute.HeadingLevel.h6`](/documentation/Foundation/AttributeScopes/AccessibilityAttributes/HeadingLevelAttribute/HeadingLevel/h6)
alongside the text.

For example, you can rank sections within UI using a heading level.
The most important section is marked with[`AttributeScopes.AccessibilityAttributes.HeadingLevelAttribute.HeadingLevel.h1`](/documentation/Foundation/AttributeScopes/AccessibilityAttributes/HeadingLevelAttribute/HeadingLevel/h1).
Nested sections can use subsequent heading levels. For unranked
headings, use [`AttributeScopes.AccessibilityAttributes.HeadingLevelAttribute.HeadingLevel.unspecified`](/documentation/Foundation/AttributeScopes/AccessibilityAttributes/HeadingLevelAttribute/HeadingLevel/unspecified).

## Topics

### Enumerations

[`enum HeadingLevel`](/documentation/Foundation/AttributeScopes/AccessibilityAttributes/HeadingLevelAttribute/HeadingLevel)

The hierarchy of a heading in relation other headings.

## Relationships

### Conforms To

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`EncodableAttributedStringKey`](/documentation/Foundation/EncodableAttributedStringKey)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`ObjectiveCConvertibleAttributedStringKey`](/documentation/Foundation/ObjectiveCConvertibleAttributedStringKey)

[`Copyable`](/documentation/Swift/Copyable)

[`MarkdownDecodableAttributedStringKey`](/documentation/Foundation/MarkdownDecodableAttributedStringKey)

[`Sendable`](/documentation/Swift/Sendable)

[`AttributedStringKey`](/documentation/Foundation/AttributedStringKey)

[`DecodableAttributedStringKey`](/documentation/Foundation/DecodableAttributedStringKey)

---

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)