Instance Property インスタンスプロパティ

accessibilityHint

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

Declaration 宣言

var accessibilityHint: String? { get set }

Discussion 解説

The default value for this property is nil unless the element is a UIKit control, in which case, the value is a system-provided hint that derives from the type of control.

An accessibility hint helps users understand what happens when they perform an action on the accessibility element when that result isn't obvious from the accessibility label. For example, if you provide an Add button in your app, the button’s accessibility label helps users understand that tapping the button adds values in the app. If, however, your app allows users to play a song by tapping its title in a list of song titles, the accessibility label for the list row doesn't tell users that. To help an assistive app provide this information to users with disabilities, an appropriate hint for the list row is “Plays the song.”

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

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

    Avoid beginning the phrase with the imperative form of a verb because that can make the hint sound like a command. For example, don't create hints like “Play the song” or “Purchase the item.”

  • Don’t include the action type in the hint. For example, don't create hints like “Tap to play the song” or “Tapping plays the song.”

  • Don’t include the control or view type in the hint. For example, don't create hints like “Plays the song in the row” or “Button that adds a contact name.”

See Also 参照

Supporting Basic Accessibility