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

var isAccessibilityElement: Bool

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

Configuring an Accessibility Element

var accessibilityActivationPoint: CGPoint

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

var accessibilityElementsHidden: Bool

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

var accessibilityFrame: CGRect

The frame of the accessibility element, in screen coordinates.

var accessibilityHint: String?

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

var accessibilityLabel: String?

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

var accessibilityLanguage: String?

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

var accessibilityPath: UIBezierPath?

The path of the element, in screen coordinates.

var accessibilityTraits: UIAccessibilityTraits

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

var accessibilityValue: String?

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

var accessibilityViewIsModal: Bool

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

var shouldGroupAccessibilityChildren: Bool

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

var accessibilityNavigationStyle: UIAccessibilityNavigationStyle

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

Constants

typealias UIAccessibilityTraits

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

Accessibility Traits

Accessibility traits that tell an assistive application how an accessibility element behaves or should be treated.

enum UIAccessibilityZoomType

The types of system zoom that can be in effect.

typealias UIAccessibilityNotifications

A notification that an accessible application can send.

Notification Dictionary Keys

Keys used in the userInfo parameter dictionary of notifications.

Speech Attributes for Attributed Strings

Attributes that you can apply to text in an attributed string to modify how that text is pronounced.

Text Attributes for Attributed Strings

Attributes that you can apply to text in an attributed string to convey extra information about the text.

Assistive Technology Identifiers

Identifiers that you can use when pausing and resuming assistive technologies.

enum UIAccessibilityNavigationStyle

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

See Also

First Steps

UIAccessibilityContainer

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