Accessibility

Make your app more accessible to users with disabilities.

Topics

First Steps

protocol NSAccessibility

The complete list of properties and methods implemented by accessible elements.

protocol NSAccessibilityContainsTransientUI

A set of methods that support accessibility in a UI that changes dynamically—usually in response to mouse-hover events.

AppKit Elements

protocol NSAccessibilityElementProtocol

A role-based protocol that declares the minimum interface required to interact with an accessibility client.

protocol NSAccessibilityButton

A role-based protocol that declares the minimum interface required for an accessibility element to act as a button.

protocol NSAccessibilityCheckBox

A role-based protocol that declares the minimum interface required for an accessibility element to act as a checkbox.

protocol NSAccessibilityImage

A role-based protocol that declares the minimum interface required for an accessibility element to act as a image.

protocol NSAccessibilityList

A role-based protocol that declares the minimum interface required for an accessibility element to act as a list view.

protocol NSAccessibilityNavigableStaticText

A role-based protocol that declares the minimum interface required for an accessibility element to act as navigable static text.

protocol NSAccessibilityOutline

A role-based protocol that declares the minimum interface required for an accessibility element to act as an outline view.

protocol NSAccessibilityProgressIndicator

A role-based protocol that declares the minimum interface required for an accessibility element to act as a progress indicator.

protocol NSAccessibilityRadioButton

A role-based protocol that declares the minimum interface required for an accessibility element to act as a radio button.

protocol NSAccessibilityRow

A role-based protocol that declares the minimum interface required for an accessibility element to act as a row for a table, list, or outline view.

protocol NSAccessibilitySlider

A role-based protocol that declares the minimum interface required for an accessibility element to act as a slider.

protocol NSAccessibilityStaticText

A role-based protocol that declares the minimum interface required for an accessibility element to act as static text.

protocol NSAccessibilityStepper

A role-based protocol that declares the minimum interface required for an accessibility element to act as a stepper.

protocol NSAccessibilitySwitch

A role-based protocol that declares the minimum interface required for an accessibility element to act as a switch.

protocol NSAccessibilityTable

A role-based protocol that declares the minimum interface required for an accessibility element to act as a table view.

Custom Elements

class NSAccessibilityElement

The basic infrastructure required to interact with an accessibility client.

protocol NSAccessibilityGroup

A role-based protocol that declares the minimum interface required to act as a container for other user interface elements.

protocol NSAccessibilityLayoutArea

A role-based protocol that declares the minimum interface required for an accessibility element to act as a layout area.

protocol NSAccessibilityLayoutItem

A role-based protocol that declares the minimum interface required for an accessibility element to act as a layout item.

Convenience Functions

var description: String?

Returns a standard description for an action.

func NSAccessibilityPostNotification(Any, NSAccessibilityNotificationName)

Sends a notification to any observing assistive applications.

func NSAccessibilityPostNotificationWithUserInfo(Any, NSAccessibilityNotificationName, [NSAccessibilityNotificationUserInfoKey : Any])

Sends a notification and an optional userInfo dictionary to any observing assistive applications.

func NSAccessibilityRaiseBadArgumentException(Any!, NSAccessibilityAttributeName!, Any!)

Raises an error if the parameter is the wrong type or has an illegal value

Deprecated
func description(with: NSAccessibilitySubrole?)

Returns a standard description for a role and subrole.

static func description(for: Any)

Returns a standard role description for a user interface element.

func NSAccessibilitySetMayContainProtectedContent(Bool)

Sets whether the app may have protected content.

func NSAccessibilityUnignoredChildren([Any])

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

func NSAccessibilityUnignoredChildrenForOnlyChild(Any)

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

func NSAccessibilityUnignoredDescendant(Any)

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

func NSAccessibilityUnignoredAncestor(Any)

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

func NSAccessibilityFrameInView(NSView, NSRect)

Returns the frame in screen coordinates.

func NSAccessibilityPointInView(NSView, NSPoint)

Returns the point in screen coordinates.

Deprecated

NSAccessibility

The NSAccessibility informal protocol defines an old, key-based API. For the most part, the use of this API is discouraged. Use the new, method-based API instead. However, there are a few methods and properties that are still relevant. You can combine the accessibilityHitTest(_:) method and the accessibilityFocusedUIElement and accessibilityNotifiesWhenDestroyed properties with the new NSAccessibility protocol. For more information on the new, method-based API see Accessibility Programming Guide for OS X or NSAccessibility.

See Also

User Interface

Views and Controls

Present and define the interactions for your content onscreen.

View Management

Manage your user interface, including the size and position of views in a window.

Menus, Cursors, and the Dock

Implement menus and cursors to facilitate interactions with your app, and use your app's Dock tile to convey updated information.

Windows, Panels, and Screens

Organize your view hierarchies and facilitate their display onscreen.

Touch Bar

Display interactive content and controls in the Touch Bar.

Animation

Animate your views and other content to create a more engaging experience for users.

Drag and Drop

Support the direct manipulation of your app's content using drag and drop.

Sound, Speech, and Haptics

Play sounds and haptic feedback, and incorporate speech recognition and synthesis into your interface.