diff --git a/Libraries/Text/Text.js b/Libraries/Text/Text.js index 7e0d5734929651..35c7d1bc2bf01f 100644 --- a/Libraries/Text/Text.js +++ b/Libraries/Text/Text.js @@ -48,11 +48,20 @@ const Text: React.AbstractComponent< const [isHighlighted, setHighlighted] = useState(false); + const _disabled = + restProps.disabled != null + ? restProps.disabled + : props.accessibilityState?.disabled; + const _accessibilityState = + _disabled !== props.accessibilityState?.disabled + ? {...props.accessibilityState, disabled: _disabled} + : props.accessibilityState; + const isPressable = (onPress != null || onLongPress != null || onStartShouldSetResponder != null) && - restProps.disabled !== true; + _disabled !== true; const initialized = useLazyInitialization(isPressable); const config = useMemo( @@ -174,7 +183,9 @@ const Text: React.AbstractComponent<