Note: accessibilityTraits
will soon be deprecated. When possible, use accessibilityRole
and accessibilityStates
instead of accessibilityTraits
and accessibilityComponentType
.
The accessibilityTraits property is used to tell a person using VoiceOver what kind of element they have selected.
"none"
"button"
"link"
"header"
"search"
"image"
"selected"
"plays"
"key"
"text"
"summary"
"disabled"
"frequentUpdates"
"startsMedia"
"adjustable"
"allowsDirectInteraction"
"pageTurn"
This rule takes no arguments.
<TouchableOpacity accessibilityTraits="button" />
<TouchableOpacity accessibilityTraits="primary-button" />