File tree Expand file tree Collapse file tree 7 files changed +34
-0
lines changed
React/Fabric/Mounting/ComponentViews/View
ReactCommon/react/renderer/components/view Expand file tree Collapse file tree 7 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -334,6 +334,14 @@ export interface AccessibilityPropsIOS {
334
334
* @platform ios
335
335
*/
336
336
accessibilityLargeContentTitle ?: string | undefined ;
337
+
338
+ /**
339
+ * Blocks the user from interacting with the component through keyboard while still allowing
340
+ * screen reader to interact with it if this View is still accessible.
341
+ *
342
+ * @platform ios
343
+ */
344
+ accessibilityRespondsToUserInteraction ?: boolean | undefined ;
337
345
}
338
346
339
347
export type Role =
Original file line number Diff line number Diff line change @@ -320,6 +320,14 @@ export type AccessibilityPropsIOS = $ReadOnly<{
320
320
* @platform ios
321
321
*/
322
322
accessibilityLanguage ?: ?Stringish ,
323
+
324
+ /**
325
+ * Blocks the user from interacting with the component through keyboard while still allowing
326
+ * screen reader to interact with it if this View is still accessible.
327
+ *
328
+ * @platform ios
329
+ */
330
+ accessibilityRespondsToUserInteraction ?: ?boolean ,
323
331
} > ;
324
332
325
333
export type AccessibilityProps = $ReadOnly < {
Original file line number Diff line number Diff line change @@ -198,6 +198,7 @@ const validAttributesForNonEventProps = {
198
198
accessibilityShowsLargeContentViewer : true ,
199
199
accessibilityLargeContentTitle : true ,
200
200
experimental_accessibilityOrder : true ,
201
+ accessibilityRespondsToUserInteraction : true ,
201
202
testID : true ,
202
203
backgroundColor : { process : require ( '../StyleSheet/processColor' ) . default } ,
203
204
backfaceVisibility : true ,
Original file line number Diff line number Diff line change @@ -3652,6 +3652,7 @@ export type AccessibilityPropsIOS = $ReadOnly<{
3652
3652
\\"aria-modal\\"?: ?boolean,
3653
3653
accessibilityElementsHidden?: ?boolean,
3654
3654
accessibilityLanguage?: ?Stringish,
3655
+ accessibilityRespondsToUserInteraction?: ?boolean,
3655
3656
}>;
3656
3657
export type AccessibilityProps = $ReadOnly<{
3657
3658
...AccessibilityPropsAndroid,
Original file line number Diff line number Diff line change @@ -440,6 +440,11 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared &
440
440
}
441
441
}
442
442
443
+ if (oldViewProps.accessibilityRespondsToUserInteraction != newViewProps.accessibilityRespondsToUserInteraction ) {
444
+ self.accessibilityElement .accessibilityRespondsToUserInteraction =
445
+ newViewProps.accessibilityRespondsToUserInteraction ;
446
+ }
447
+
443
448
// `testId`
444
449
if (oldViewProps.testId != newViewProps.testId ) {
445
450
SEL setAccessibilityIdentifierSelector = @selector (setAccessibilityIdentifier: );
Original file line number Diff line number Diff line change @@ -154,6 +154,15 @@ AccessibilityProps::AccessibilityProps(
154
154
" accessibilityIgnoresInvertColors" ,
155
155
sourceProps.accessibilityIgnoresInvertColors,
156
156
false )),
157
+ accessibilityRespondsToUserInteraction(
158
+ ReactNativeFeatureFlags::enableCppPropsIteratorSetter ()
159
+ ? sourceProps.accessibilityRespondsToUserInteraction
160
+ : convertRawProp(
161
+ context,
162
+ rawProps,
163
+ " accessibilityRespondsToUserInteraction" ,
164
+ sourceProps.accessibilityRespondsToUserInteraction,
165
+ {})),
157
166
onAccessibilityTap(
158
167
ReactNativeFeatureFlags::enableCppPropsIteratorSetter ()
159
168
? sourceProps.onAccessibilityTap
@@ -266,6 +275,7 @@ void AccessibilityProps::setProp(
266
275
RAW_SET_PROP_SWITCH_CASE_BASIC (accessibilityViewIsModal);
267
276
RAW_SET_PROP_SWITCH_CASE_BASIC (accessibilityElementsHidden);
268
277
RAW_SET_PROP_SWITCH_CASE_BASIC (accessibilityIgnoresInvertColors);
278
+ RAW_SET_PROP_SWITCH_CASE_BASIC (accessibilityRespondsToUserInteraction);
269
279
RAW_SET_PROP_SWITCH_CASE_BASIC (onAccessibilityTap);
270
280
RAW_SET_PROP_SWITCH_CASE_BASIC (onAccessibilityMagicTap);
271
281
RAW_SET_PROP_SWITCH_CASE_BASIC (onAccessibilityEscape);
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ class AccessibilityProps {
49
49
bool accessibilityViewIsModal{false };
50
50
bool accessibilityElementsHidden{false };
51
51
bool accessibilityIgnoresInvertColors{false };
52
+ bool accessibilityRespondsToUserInteraction{};
52
53
bool onAccessibilityTap{};
53
54
bool onAccessibilityMagicTap{};
54
55
bool onAccessibilityEscape{};
You can’t perform that action at this time.
0 commit comments