<!--
{
  "documentType" : "article",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/text-specific-attributes",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Text-Specific Attributes"
}
-->

# Text-Specific Attributes

Attributes that are specific to text.

## Topics

### Constants

[`static let insertionPointLineNumber: NSAccessibility.Attribute`](/documentation/AppKit/NSAccessibility-swift.struct/Attribute/insertionPointLineNumber)

The line number containing the insertion point (`NSNumber`).

[`static let numberOfCharacters: NSAccessibility.Attribute`](/documentation/AppKit/NSAccessibility-swift.struct/Attribute/numberOfCharacters)

The number of characters in the text (`NSNumber`).

[`static let selectedText: NSAccessibility.Attribute`](/documentation/AppKit/NSAccessibility-swift.struct/Attribute/selectedText)

The currently selected text (`NSString`).

[`static let selectedTextRange: NSAccessibility.Attribute`](/documentation/AppKit/NSAccessibility-swift.struct/Attribute/selectedTextRange)

The range of selected text (`NSValue`).

[`static let selectedTextRanges: NSAccessibility.Attribute`](/documentation/AppKit/NSAccessibility-swift.struct/Attribute/selectedTextRanges)

An array of `NSValue` (`rangeValue`) ranges of selected text (`NSArray`).

[`static let sharedCharacterRange: NSAccessibility.Attribute`](/documentation/AppKit/NSAccessibility-swift.struct/Attribute/sharedCharacterRange)

The (`rangeValue`) part of shared text in this view (`NSValue`).

[`static let sharedTextUIElements: NSAccessibility.Attribute`](/documentation/AppKit/NSAccessibility-swift.struct/Attribute/sharedTextUIElements)

The elements with which the text of this element is shared (`NSArray`).

[`static let visibleCharacterRange: NSAccessibility.Attribute`](/documentation/AppKit/NSAccessibility-swift.struct/Attribute/visibleCharacterRange)

The range of visible text (`NSValue`).



---

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)