<!--
{
  "availability" : [
    "macOS: 10.10.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSAccessibilityProtocol/accessibilityRange(forLine:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSAccessibility(im)accessibilityRangeForLine:"
  },
  "title" : "accessibilityRange(forLine:)"
}
-->

# accessibilityRange(forLine:)

Returns the range of characters in the specified line.

```
func accessibilityRange(forLine line: Int) -> NSRange
```

## Parameters

`line`

The line number to be examined.

## Return Value

The range of characters for the specified line number. If the line ends with a newline character, including the newline is preferred.

---

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)