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

accessibilityLabel

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

Declaration 宣言

var accessibilityLabel: 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 label that derives from the control’s title.

If you implement a custom control or view, or if you display a custom icon on a UIKit control, set this property to make sure your accessibility elements have appropriate labels. If an accessibility element doesn't display a descriptive label, set this property to supply a short localized label that succinctly identifies the accessibility element. For example, a “Play music” button might display an icon that indicates what it does to sighted users. To be accessible, however, the button needs the accessibility label Play or Play music so that an assistive app can provide this information to users with disabilities. Note that the label never includes the control type (such as button) because the traits of the accessibility element contain that information.

See Also 参照

Supporting Basic Accessibility