From 214da52fe76c1688d0c1a402b3e6c4d0fc19d882 Mon Sep 17 00:00:00 2001 From: Eli White Date: Thu, 8 Mar 2018 15:48:39 -0800 Subject: [PATCH] AccessibilityLabel is optional Summary: We have a bunch of components internally that use accessibilityLabel in invalid ways. View was originally typed as any so invalid usages weren't caught. In order to fix these we have to move forward with getting back to flow having no errors. We are weakening these types to get there and we can tighten them again later. Reviewed By: yungsters Differential Revision: D7203260 fbshipit-source-id: 2282eba14899c620de5b4b1c1b2670b157f2fc9e --- Libraries/Components/View/ViewPropTypes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/Components/View/ViewPropTypes.js b/Libraries/Components/View/ViewPropTypes.js index 7ced5e35f2bf5a..570862988d67e2 100644 --- a/Libraries/Components/View/ViewPropTypes.js +++ b/Libraries/Components/View/ViewPropTypes.js @@ -46,7 +46,7 @@ export type ViewLayoutEvent = { // so we must include TVViewProps export type ViewProps = { accessible?: bool, - accessibilityLabel?: React$PropType$Primitive, + accessibilityLabel?: null | React$PropType$Primitive | string | Array | any, accessibilityActions?: Array, accessibilityComponentType?: AccessibilityComponentType, accessibilityLiveRegion?: 'none' | 'polite' | 'assertive',