UIAccessibilityAction

The UIAccessibilityAction informal protocol provides a way for accessibility elements to support specific actions, such as selecting values in a range or scrolling through information on the screen. For example, to respond to a scrolling gesture, you implement the accessibilityScroll(_:) method and post UIAccessibilityPageScrolledNotification with the new page status (such as “Page 3 of 9”). Or, to make an element such as a slider or picker view accessible, you first need to characterize it by including the UIAccessibilityTraitAdjustable trait. Then, you must implement the accessibilityIncrement() and accessibilityDecrement() methods. When you do this, assistive technology users can adjust the element using gestures specific to the assistive technology.

Symbols

Performing an Action

func accessibilityActivate()

Tells the element to activate itself and report the success or failure of the operation.

func accessibilityIncrement()

Tells the accessibility element to increment the value of its content.

func accessibilityDecrement()

Tells the accessibility element to decrement the value of its content.

func accessibilityScroll(UIAccessibilityScrollDirection)

Scrolls screen content in an application-specific way and returns the success or failure of the action.

func accessibilityPerformEscape()

Dismisses a modal view and returns the success or failure of the action.

func accessibilityPerformMagicTap()

Performs a salient action.

Accessing Custom Actions

var accessibilityCustomActions: [UIAccessibilityCustomAction]?

An array of custom actions to display along with the built-in actions.

Constants

UIAccessibilityScrollDirection

The direction of a scrolling action.