UIAccessibility

A set of methods that provide accessibility information about views and controls in an app's user interface.

Overview

The UIAccessibility informal protocol provides accessibility information about an app’s user interface elements. Assistive apps, such as VoiceOver, convey this information to users with disabilities to help them use the app.

Standard UIKit controls and views implement the UIAccessibility methods and are therefore accessible to assistive apps by default. This means that if your app uses only standard controls and views, such as UIButton, UISegmentedControl, and UITableView, you need only supply app-specific details when the default values are incomplete. You can do this by setting these values in Interface Builder or by setting the properties in this informal protocol.

The UIAccessibility informal protocol is also implemented by the UIAccessibilityElement class, which represents custom user interface objects. If you create a completely custom UIView subclass, you might need to create an instance of UIAccessibilityElement to represent it. In this case, you would support all the UIAccessibility properties to correctly set and return the accessibility element’s properties.

Topics

Determining Accessibility

isAccessibilityElement

A Boolean value indicating whether the receiver is an accessibility element that an assistive application can access.

Configuring Behavior

Accessibility Traits

Tell an assistive application how an accessibility element behaves or should be treated by setting these accessibility traits

accessibilityTraits

The combination of accessibility traits that best characterize the accessibility element.

UIAccessibilityTraits

A mask that contains the OR combination of the accessibility traits that best characterize an accessibility element.

accessibilityCustomRotors

An array of custom rotors for the current element.

accessibilityElementsHidden

A Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden.

accessibilityNotifiesWhenDestroyed

A Boolean value that indicates whether a custom accessibility object sends a notification when its corresponding UI element is destroyed.

accessibilityRespondsToUserInteraction

A Boolean value indicating whether the element performs an action based on user interaction.

accessibilityViewIsModal

A Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver.

shouldGroupAccessibilityChildren

A Boolean value indicating whether VoiceOver should group together the elements that are children of the receiver, regardless of their positions on the screen.

Defining Accessibility Text and Language

Speech Attributes for Attributed Strings

Apply attributes to text in an attributed string to modify how that text is pronounced.

Text Attributes for Attributed Strings

Apply attributes to text in an attributed string to convey extra information about the text.

accessibilityHeaderElements

An array of elements considered to be the headers for this element.

accessibilityAttributedHint

The underlying attributed version of the accessibility hint.

accessibilityHint

A brief description of the result of performing an action on the accessibility element, in a localized string.

accessibilityAttributedLabel

The underlying attributed version of the accessibility label.

accessibilityLabel

A succinct label that identifies the accessibility element, in a localized string.

accessibilityLanguage

The language in which to speak the accessibility element's label, value, and hint.

accessibilityTextualContext

A named context that helps identify and classify the type of text inside an element.

accessibilityAttributedUserInputLabels

The underlying attributed versions of the accessibility user input labels.

accessibilityUserInputLabels

An array of localized labels the user provides to refer to this element.

accessibilityAttributedValue

The underlying attributed version of the accessibility value.

accessibilityValue

The value of the accessibility element, in a localized string.

Handling Notifications

Assistive Technology Identifiers

Manage pausing and resuming assistive technologies with these identifiers.

Notification Dictionary Keys

Handle notifications with the keys defined in the userInfo parameter dictionary.

UIAccessibilityNotifications

A notification that an accessible application can send.

Navigating Elements

UIAccessibilityContainer

Provide a set of methods that view subclasses use to make subcomponents accessible as separate elements.

accessibilityActivationPoint

The activation point for the accessibility element, in screen coordinates.

accessibilityFocusedUIElement

The deepest descendant of the accessibility hierarchy that has the focus.

accessibilityFrame

The frame of the accessibility element, in screen coordinates.

- accessibilityHitTest:

Returns the deepest descendant of the accessibility hierarchy that contains the specified point.

accessibilityNavigationStyle

The navigation style to apply to the object and its elements.

UIAccessibilityNavigationStyle

Constants that describe how an object’s elements should be navigated by an assistive technology.

accessibilityPath

The path of the element, in screen coordinates.

UIAccessibilityZoomFocusChanged

Notifies the system that the app’s focus has changed to a new location.

UIAccessibilityZoomType

The types of system zoom that can be in effect.

See Also

Essentials

UIAccessibilityContainer

Provide a set of methods that view subclasses use to make subcomponents accessible as separate elements.

Supporting VoiceOver in Your App

Learn how to make your iOS app more accessible to users who are blind or have low vision by adding VoiceOver support.