Class

UIAccessibilityElement

Encapsulates information about an item that should be accessible to users with disabilities, but that isn’t accessible by default.

Declaration

@interface UIAccessibilityElement : UIResponder

Overview

You can use UIAccessibilityElement to provide information about an icon or text image is not automatically accessible because it does not inherit from UIView (or UIControl). A view that contains such nonview items creates an instance of UIAccessibilityElement to represent each item that needs to be accessible.

The properties of an accessibility element provide information about the element, such as location and current value, to an assistive application. You might need to set an element’s property even if you don’t need to create an instance of UIAccessibilityElement to represent it. For example, if your app includes a button with a custom icon that means “solve,” the button itself is already represented by an accessibility element because it is a subclass of UIButton. However, you need to supply information for the label and hint properties because this information is unique to this button. You can do this in Interface Builder or by setting the properties in the UIAccessibility informal protocol.

Topics

Creating an Accessibility Element

- initWithAccessibilityContainer:

Creates and initializes an accessibility element to represent an item in the specified container.

Accessing the Containing View

accessibilityContainer

The view that contains the accessibility element.

Determining Accessibility

isAccessibilityElement

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

Accessing the Attributes of an Accessibility Element

accessibilityLabel

A string that succinctly identifies the accessibility element.

accessibilityHint

A string that briefly describes the result of performing an action on the accessibility element.

accessibilityValue

A string that represents the current value of the accessibility element.

accessibilityFrame

The frame of the accessibility element, in screen coordinates.

accessibilityFrameInContainerSpace

The frame of the accessibility element, in the coordinate space of its container view.

accessibilityTraits

The combination of traits that best characterize the accessibility element.

Relationships

Inherits From

See Also

Elements

UIScrollViewAccessibilityDelegate

A set of methods you can implement to provide accessibility information for a scroll view.

UIPickerViewAccessibilityDelegate

A set of methods you can implement to provide accessibility information for individual components of a picker view.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software