Skip to content

Latest commit

 

History

History
43 lines (32 loc) · 683 Bytes

has-valid-accessibility-traits.md

File metadata and controls

43 lines (32 loc) · 683 Bytes

has-valid-accessibility-traits

The accessibilityTraits property is used to tell a person using VoiceOver what kind of element they have selected.

Values may be one of the following:

  • none
  • button
  • link
  • header
  • search
  • image
  • selected
  • plays
  • key
  • text
  • summary
  • disabled
  • frequentUpdates
  • startsMedia
  • adjustable
  • allowsDirectInteraction
  • pageTurn

References

  1. https://facebook.github.io/react-native/docs/accessibility.html#accessibilitytraits-ios

Rule details

This rule takes no arguments.

Succeed

<TouchableOpacity accessibilityTraits="button" />

Fail

<TouchableOpacity accessibilityTraits="primary-button" />