Instance Property

accessibilityHint

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

Declaration

var accessibilityHint: String? { get set }

Discussion

The default value for this property is nil unless the receiver is a UIKit control, in which case the value is a system-provided hint based on the type of control.

An accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label. For example, if you provide an Add button in your application, the button’s accessibility label helps users understand that tapping the button adds values in the application. If, on the other hand, your application allows users to play a song by tapping its title in a list of song titles, the accessibility label for the list row does not tell users this. To help an assistive application provide this information to users with disabilities, an appropriate hint for the list row would be “Plays the song.”

Follow these guidelines to create a hint for an accessibility element:

  • Begin with a verb that names the results of the action, such as “Plays the song” or “Purchases the item” in a very brief phrase.

    Avoid beginning the phrase with the imperative form of a verb, because this can make the hint sound like a command. For example, do not create a hint such as “Play the song” or “Purchase the item.”

  • Don’t repeat the action type in the hint. For example, do not create hints such as “Tap to play the song” or “Tapping plays the song.”

  • Don’t repeat the control or view type in the hint. For example, do not create hints such as “Plays the song in the row” or “Button that adds a contact name.”

See Also

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 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.