diff --git a/packages/react-native/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js b/packages/react-native/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js index 9790969890f8..f77ae45db918 100644 --- a/packages/react-native/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +++ b/packages/react-native/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js @@ -98,8 +98,9 @@ const AccessibilityInfo = { * See https://reactnative.dev/docs/accessibilityinfo#isBoldTextEnabled */ isBoldTextEnabled(): Promise { - // [macOS rework logic to return Promise.resolve(false) on macOS - if (Platform.OS === 'ios') { + if (Platform.OS === 'android' || Platform.OS === 'macos' /* [macOS] */) { + return Promise.resolve(false); + } else { return new Promise((resolve, reject) => { if (NativeAccessibilityManagerApple != null) { NativeAccessibilityManagerApple.getCurrentBoldTextState( @@ -110,10 +111,7 @@ const AccessibilityInfo = { reject(new Error('NativeAccessibilityManagerIOS is not available')); } }); - } else { - return Promise.resolve(false); } - // macOS] }, /** @@ -333,8 +331,9 @@ const AccessibilityInfo = { * See https://reactnative.dev/docs/accessibilityinfo#isReduceTransparencyEnabled */ isReduceTransparencyEnabled(): Promise { - // [macOS rework logic to return Promise.resolve(false) on macOS - if (Platform.OS === 'ios') { + if (Platform.OS === 'android' || Platform.OS === 'macos' /* [macOS] */) { + return Promise.resolve(false); + } else { return new Promise((resolve, reject) => { if (NativeAccessibilityManagerApple != null) { NativeAccessibilityManagerApple.getCurrentReduceTransparencyState( @@ -345,10 +344,7 @@ const AccessibilityInfo = { reject(new Error('NativeAccessibilityManagerIOS is not available')); } }); - } else { - return Promise.resolve(false); } - // macOS] }, /** diff --git a/packages/react-native/Libraries/Components/Touchable/TouchableBounce.js b/packages/react-native/Libraries/Components/Touchable/TouchableBounce.js index d86ce2d69431..6cbf25770a42 100644 --- a/packages/react-native/Libraries/Components/Touchable/TouchableBounce.js +++ b/packages/react-native/Libraries/Components/Touchable/TouchableBounce.js @@ -202,7 +202,11 @@ class TouchableBounce extends React.Component< this.props.enableFocusRing === true) && !this.props.disabled } - focusable={this.props.focusable !== false && !this.props.disabled} + focusable={ + this.props.focusable !== false && + this.props.onPress !== undefined && // [macOS] mirror upstream's 0.83 focusable guard + !this.props.disabled + } tooltip={this.props.tooltip} onMouseEnter={this.props.onMouseEnter} onMouseLeave={this.props.onMouseLeave}