<!--
{
  "documentType" : "article",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/accessibility-functions",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Accessibility Functions"
}
-->

# Accessibility Functions

Global accessibility functions for custom views and controls.

## Discussion

Use these [`NSAccessibility`](/documentation/AppKit/NSAccessibility-swift.struct) functions to enhance the accessibility experience of your custom view or control. Standard AppKit elements handle this behavior for you.

### Notifications

Your custom view or control may need to let the assistive app know when changes occur. For example, if your control’s value changes, you need to send a [`valueChanged`](/documentation/AppKit/NSAccessibility-swift.struct/Notification/valueChanged) notification.

[`NSAccessibility.Notification`](/documentation/AppKit/NSAccessibility-swift.struct/Notification) defines a number of notifications that you can send using the [`post(element:notification:)`](/documentation/AppKit/NSAccessibility-swift.struct/post(element:notification:)) method. You typically need to send your own notifications only when you’re creating a custom control or when you’re using a standard control in a nonstandard way. Make sure you’re posting any relevant notifications as your control’s state changes.

## Topics

### Notifications

[`post(element:notification:)`](/documentation/AppKit/NSAccessibility-swift.struct/post(element:notification:))

Sends a notification to any observing assistive apps.

[`post(element:notification:userInfo:)`](/documentation/AppKit/NSAccessibility-swift.struct/post(element:notification:userInfo:))

Sends a notification and an optional user info dictionary to any observing assistive apps.

[`NSAccessibility.Notification`](/documentation/AppKit/NSAccessibility-swift.struct/Notification)

The name of the notification.

[`NSAccessibility.NotificationUserInfoKey`](/documentation/AppKit/NSAccessibility-swift.struct/NotificationUserInfoKey)

The key in the user info dictionary for a notification.

### Screen Coordinates

[`screenRect(fromView:rect:)`](/documentation/AppKit/NSAccessibility-swift.struct/screenRect(fromView:rect:))

Returns the frame in screen coordinates.

[`screenPoint(fromView:point:)`](/documentation/AppKit/NSAccessibility-swift.struct/screenPoint(fromView:point:))

Returns the point in screen coordinates.

### Accessibility Objects

[`unignoredChildren(from:)`](/documentation/AppKit/NSAccessibility-swift.struct/unignoredChildren(from:))

Returns a list of unignored accessibility objects, descending the hierarchy, if necessary.

[`unignoredChildrenForOnlyChild(from:)`](/documentation/AppKit/NSAccessibility-swift.struct/unignoredChildrenForOnlyChild(from:))

Returns a list of unignored accessibility objects, descending the hierarchy, if necessary.

[`unignoredDescendant(of:)`](/documentation/AppKit/NSAccessibility-swift.struct/unignoredDescendant(of:))

Returns an unignored accessibility object, descending the hierarchy, if necessary.

[`unignoredAncestor(of:)`](/documentation/AppKit/NSAccessibility-swift.struct/unignoredAncestor(of:))

Returns an unignored accessibility object, ascending the hierarchy, if necessary.

### Protected Content

[`setMayContainProtectedContent(_:)`](/documentation/AppKit/NSAccessibility-swift.struct/setMayContainProtectedContent(_:))

Sets whether the app may have protected content.

### Descriptions

[`description`](/documentation/AppKit/NSAccessibility-swift.struct/Action/description)

Returns a standard description for an action.

[`description(with:)`](/documentation/AppKit/NSAccessibility-swift.struct/Role/description(with:))

Returns a standard description for a role and subrole.

[`description(for:)`](/documentation/AppKit/NSAccessibility-swift.struct/Role/description(for:))

Returns a standard role description for a user interface element.



---

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)