可访问性 (a11y) 使应用程序对每个人都可用,包括残疾人(使用屏幕阅读器等)。React Native 提供可访问性 props 和 API。构建可访问的应用程序对于包容性很重要,通常在法律上是必需的,并反映了高质量的工程。
为什么这很重要
→ INCLUSIVITY — people with disabilities (visual, motor, hearing) should be able to use
the app (screen readers like VoiceOver/TalkBack, larger text, etc.)
→ Often LEGALLY required (accessibility regulations) and an app-store/quality consideration
→ Good a11y often improves UX for everyone (clear labels, good contrast, large targets)
React Native 中的可访问性 Props
<
accessible={}
accessibilityLabel=
accessibilityHint=
accessibilityRole=
accessibilityState={{ : }}
>
</>
