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

# accessibilitySelectedRows()

Returns the currently selected rows for the table.

```
optional func accessibilitySelectedRows() -> [any NSAccessibilityRow]?
```

## Return Value

An array containing the currently selected rows for the table.

## Discussion

This method is the getter for the [`NSAccessibilityProtocol`](/documentation/AppKit/NSAccessibilityProtocol) protocol’s [`accessibilitySelectedRows`](/documentation/AppKit/NSAccessibility-c.protocol/accessibilitySelectedRows) property. Additionally, your class needs to send a [`selectedRowsChanged`](/documentation/AppKit/NSAccessibility-swift.struct/Notification/selectedRowsChanged) notification whenever the table’s selected rows change.

## See Also

[`accessibilitySelectedRows`](/documentation/AppKit/NSAccessibility-c.protocol/accessibilitySelectedRows)

The currently selected rows for the table or outline.



---

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)