From 3b01f3d20d8e309c4ae86613313f51bb21f3e8db Mon Sep 17 00:00:00 2001 From: Calvin Liu Date: Fri, 18 Sep 2026 12:35:53 -0700 Subject: [PATCH] Preserve unset accessibilityState.selected in C++ props (#58599) Summary: Pull Request resolved: https://github.com/react/react-native/pull/58599 `AccessibilityState::selected` was a plain `bool` defaulting to `false`, so the native side could not tell a component that is selectable but currently unselected (`accessibilityState={{selected: false}}`) from one that is not selectable at all (`accessibilityState={{}}`). Both arrived as `false`. The JS type is already `selected?: ?boolean`, so this is the bridge discarding a value the public API accepts. Make `selected` a `std::optional` defaulting to `std::nullopt`. JS accessibilityState native selected (before -> after) {} false -> undefined {selected: false} false -> false {selected: true} true -> true This aligns the representation with ARIA, which `accessibilityState` mirrors: the bool / tri-state split now tracks which ARIA attributes admit an undefined value. field ARIA value type admits undefined representation disabled boolean no bool busy boolean no bool selected boolean yes std::optional (changed) expanded boolean yes std::optional checked tristate yes CheckedState (None = unset) That is also why `disabled` and `busy` stay plain `bool`: ARIA gives them no undefined value, so there is no unset state to preserve. `expanded` was made optional for this same reason in https://github.com/facebook/react-native/pull/40881 and `checked` has always carried a `None`; `selected` was the outlier. Nor is "unset" merely "absent" for this attribute. `testing-library/dom` computes it as `boolean | undefined`, documented "false/true if (not)selected, undefined if not selectable" -- the same shape, with the same meaning, that this change introduces. Host platforms need the distinction: on Windows a selectable component must implement ISelectionItemProvider so UIA can report selection state, and with the old representation every component carrying an accessibilityState looked selectable. iOS and Android rendering is unchanged. Trait derivation coalesces the optional with `value_or(false)`, and the Android serializer omits the key when the value is unset, which `BaseViewManager#setViewState` already handles by falling back to `setSelected(false)`. Reviewer note: `std::optional` is contextually convertible to `bool`, so a bare `if (state.selected)` still compiles but tests engagement rather than value, silently marking an explicitly unselected component as selected. There is a regression test for that specific hazard. Fixes https://github.com/facebook/react-native/issues/46988 Supersedes https://github.com/facebook/react-native/pull/47296, which went stale. Changelog: [General][Breaking] - `AccessibilityState::selected` is now `std::optional` in C++ props, preserving an unset `selected` instead of coercing it to `false` Reviewed By: javache Differential Revision: D120049025 --- .../Pressable/__tests__/Pressable-itest.js | 20 ++--- .../Switch/__tests__/Switch-itest.js | 2 +- .../__tests__/TouchableHighlight-itest.js | 10 +-- .../TouchableNativeFeedback-itest.js | 12 +-- .../__tests__/TouchableOpacity-itest.js | 4 +- .../TouchableWithoutFeedback-itest.js | 8 +- .../Components/View/__tests__/View-itest.js | 16 ++-- .../__snapshots__/LogBoxButton-itest.js.snap | 2 +- .../LogBoxInspector-itest.js.snap | 34 +++++--- .../LogBoxInspectorCodeFrame-itest.js.snap | 81 +++++++++++++++++-- .../LogBoxInspectorFooter-itest.js.snap | 28 ++++--- .../LogBoxInspectorHeader-itest.js.snap | 8 +- ...LogBoxInspectorMessageHeader-itest.js.snap | 19 +++++ .../LogBoxInspectorReactFrames-itest.js.snap | 50 +++++++++--- .../LogBoxInspectorSection-itest.js.snap | 2 + ...gBoxInspectorSourceMapStatus-itest.js.snap | 6 +- .../LogBoxInspectorStackFrame-itest.js.snap | 12 ++- .../LogBoxInspectorStackFrames-itest.js.snap | 9 ++- .../__snapshots__/LogBoxMessage-itest.js.snap | 29 +++++++ .../LogBoxNotification-itest.js.snap | 7 +- .../Libraries/Text/__tests__/Text-itest.js | 4 +- .../components/view/AccessibilityPrimitives.h | 2 +- .../components/view/AccessibilityProps.cpp | 5 +- .../components/view/HostPlatformViewProps.cpp | 8 +- .../view/tests/AccessibilityPropsTest.cpp | 67 +++++++++++++++ .../api-snapshots/ReactAndroidDebugCxx.api | 2 +- .../api-snapshots/ReactAndroidNewarchCxx.api | 2 +- .../api-snapshots/ReactAndroidReleaseCxx.api | 2 +- .../api-snapshots/ReactAppleDebugCxx.api | 2 +- .../api-snapshots/ReactAppleNewarchCxx.api | 2 +- .../api-snapshots/ReactAppleReleaseCxx.api | 2 +- .../api-snapshots/ReactCommonDebugCxx.api | 2 +- .../api-snapshots/ReactCommonNewarchCxx.api | 2 +- .../api-snapshots/ReactCommonReleaseCxx.api | 2 +- 34 files changed, 368 insertions(+), 95 deletions(-) diff --git a/packages/react-native/Libraries/Components/Pressable/__tests__/Pressable-itest.js b/packages/react-native/Libraries/Components/Pressable/__tests__/Pressable-itest.js index bdf335379eb6..cdd6a35c4551 100644 --- a/packages/react-native/Libraries/Components/Pressable/__tests__/Pressable-itest.js +++ b/packages/react-native/Libraries/Components/Pressable/__tests__/Pressable-itest.js @@ -46,7 +46,7 @@ describe('', () => { expect(root.getRenderedOutput().toJSX()).toEqual( ', () => { expect(root.getRenderedOutput().toJSX()).toEqual( , ); @@ -134,7 +134,7 @@ describe('', () => { expect( root.getRenderedOutput({props: ['accessibilityState']}).toJSX(), ).toEqual( - , + , ); }); @@ -148,7 +148,7 @@ describe('', () => { expect( root.getRenderedOutput({props: ['accessibilityState']}).toJSX(), ).toEqual( - , + , ); }); @@ -164,7 +164,7 @@ describe('', () => { expect( root.getRenderedOutput({props: ['accessibilityState']}).toJSX(), ).toEqual( - , + , ); }); @@ -183,7 +183,7 @@ describe('', () => { expect( root.getRenderedOutput({props: ['accessibilityState']}).toJSX(), ).toEqual( - , + , ); }); }); @@ -201,7 +201,7 @@ describe('', () => { expect(root.getRenderedOutput().toJSX()).toEqual( , ); }); @@ -223,7 +223,7 @@ describe('', () => { expect(root.getRenderedOutput().toJSX()).toEqual( , ); }); @@ -245,7 +245,7 @@ describe('', () => { expect(root.getRenderedOutput().toJSX()).toEqual( , ); }); @@ -270,7 +270,7 @@ describe('', () => { expect(root.getRenderedOutput().toJSX()).toEqual( + accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"> { expect( root.getRenderedOutput({props: ['accessibilityState']}).toJSX(), ).toEqual( - , + , ); }); diff --git a/packages/react-native/Libraries/Components/Touchable/__tests__/TouchableHighlight-itest.js b/packages/react-native/Libraries/Components/Touchable/__tests__/TouchableHighlight-itest.js index 5c4896257452..5993615f245f 100644 --- a/packages/react-native/Libraries/Components/Touchable/__tests__/TouchableHighlight-itest.js +++ b/packages/react-native/Libraries/Components/Touchable/__tests__/TouchableHighlight-itest.js @@ -285,7 +285,7 @@ describe('', () => { expect( root.getRenderedOutput({props: ['accessibilityState']}).toJSX(), ).toEqual( - , + , ); }); @@ -303,7 +303,7 @@ describe('', () => { expect( root.getRenderedOutput({props: ['accessibilityState']}).toJSX(), ).toEqual( - , + , ); }); @@ -323,7 +323,7 @@ describe('', () => { expect( root.getRenderedOutput({props: ['accessibilityState']}).toJSX(), ).toEqual( - , + , ); }); @@ -343,7 +343,7 @@ describe('', () => { expect( root.getRenderedOutput({props: ['accessibilityState']}).toJSX(), ).toEqual( - , + , ); }); @@ -367,7 +367,7 @@ describe('', () => { expect( root.getRenderedOutput({props: ['accessibilityState']}).toJSX(), ).toEqual( - , + , ); const element = nullthrows(elementRef.current); diff --git a/packages/react-native/Libraries/Components/Touchable/__tests__/TouchableNativeFeedback-itest.js b/packages/react-native/Libraries/Components/Touchable/__tests__/TouchableNativeFeedback-itest.js index 7893b0855f10..e8b620f64fcb 100644 --- a/packages/react-native/Libraries/Components/Touchable/__tests__/TouchableNativeFeedback-itest.js +++ b/packages/react-native/Libraries/Components/Touchable/__tests__/TouchableNativeFeedback-itest.js @@ -54,7 +54,7 @@ describe('', () => { expect(root.getRenderedOutput().toJSX()).toEqual( , ); }); @@ -75,7 +75,7 @@ describe('', () => { expect( root.getRenderedOutput({props: ['accessibilityState']}).toJSX(), ).toEqual( - , + , ); }); @@ -93,7 +93,7 @@ describe('', () => { expect( root.getRenderedOutput({props: ['accessibilityState']}).toJSX(), ).toEqual( - , + , ); }); @@ -113,7 +113,7 @@ describe('', () => { expect( root.getRenderedOutput({props: ['accessibilityState']}).toJSX(), ).toEqual( - , + , ); }); @@ -133,7 +133,7 @@ describe('', () => { expect( root.getRenderedOutput({props: ['accessibilityState']}).toJSX(), ).toEqual( - , + , ); }); @@ -153,7 +153,7 @@ describe('', () => { expect( root.getRenderedOutput({props: ['accessibilityState']}).toJSX(), ).toEqual( - , + , ); }); }); diff --git a/packages/react-native/Libraries/Components/Touchable/__tests__/TouchableOpacity-itest.js b/packages/react-native/Libraries/Components/Touchable/__tests__/TouchableOpacity-itest.js index 4e10ef80d4f3..0bfba7aa9868 100644 --- a/packages/react-native/Libraries/Components/Touchable/__tests__/TouchableOpacity-itest.js +++ b/packages/react-native/Libraries/Components/Touchable/__tests__/TouchableOpacity-itest.js @@ -155,7 +155,7 @@ describe('', () => { expect( root.getRenderedOutput({props: ['accessibilityState']}).toJSX(), ).toEqual( - , + , ); }); @@ -171,7 +171,7 @@ describe('', () => { expect( root.getRenderedOutput({props: ['accessibilityState']}).toJSX(), ).toEqual( - , + , ); }); }); diff --git a/packages/react-native/Libraries/Components/Touchable/__tests__/TouchableWithoutFeedback-itest.js b/packages/react-native/Libraries/Components/Touchable/__tests__/TouchableWithoutFeedback-itest.js index 8281fdef02a3..f49793c9d438 100644 --- a/packages/react-native/Libraries/Components/Touchable/__tests__/TouchableWithoutFeedback-itest.js +++ b/packages/react-native/Libraries/Components/Touchable/__tests__/TouchableWithoutFeedback-itest.js @@ -63,7 +63,7 @@ describe('', () => { expect( root.getRenderedOutput({props: ['accessibilityState']}).toJSX(), ).toEqual( - , + , ); }); @@ -81,7 +81,7 @@ describe('', () => { expect( root.getRenderedOutput({props: ['accessibilityState']}).toJSX(), ).toEqual( - , + , ); }); @@ -101,7 +101,7 @@ describe('', () => { expect( root.getRenderedOutput({props: ['accessibilityState']}).toJSX(), ).toEqual( - , + , ); }); @@ -121,7 +121,7 @@ describe('', () => { expect( root.getRenderedOutput({props: ['accessibilityState']}).toJSX(), ).toEqual( - , + , ); }); }); diff --git a/packages/react-native/Libraries/Components/View/__tests__/View-itest.js b/packages/react-native/Libraries/Components/View/__tests__/View-itest.js index 3c46277f3a84..4e3ebfbf8425 100644 --- a/packages/react-native/Libraries/Components/View/__tests__/View-itest.js +++ b/packages/react-native/Libraries/Components/View/__tests__/View-itest.js @@ -854,7 +854,7 @@ describe('', () => { expect( root.getRenderedOutput({props: ['accessibilityState']}).toJSX(), ).toEqual( - , + , ); }); @@ -866,7 +866,7 @@ describe('', () => { expect( root.getRenderedOutput({props: ['accessibilityState']}).toJSX(), ).toEqual( - , + , ); Fantom.runTask(() => { root.render(); @@ -888,7 +888,7 @@ describe('', () => { expect( root.getRenderedOutput({props: ['accessibilityState']}).toJSX(), ).toEqual( - , + , ); }); @@ -900,7 +900,7 @@ describe('', () => { expect( root.getRenderedOutput({props: ['accessibilityState']}).toJSX(), ).toEqual( - , + , ); Fantom.runTask(() => { root.render(); @@ -922,7 +922,7 @@ describe('', () => { expect( root.getRenderedOutput({props: ['accessibilityState']}).toJSX(), ).toEqual( - , + , ); }); @@ -934,7 +934,7 @@ describe('', () => { expect( root.getRenderedOutput({props: ['accessibilityState']}).toJSX(), ).toEqual( - , + , ); Fantom.runTask(() => { root.render(); @@ -990,7 +990,7 @@ describe('', () => { expect( root.getRenderedOutput({props: ['accessibilityState']}).toJSX(), ).toEqual( - , + , ); }); @@ -1002,7 +1002,7 @@ describe('', () => { expect( root.getRenderedOutput({props: ['accessibilityState']}).toJSX(), ).toEqual( - , + , ); Fantom.runTask(() => { root.render(); diff --git a/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxButton-itest.js.snap b/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxButton-itest.js.snap index a0e85f33bf38..748cecb07aee 100644 --- a/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxButton-itest.js.snap +++ b/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxButton-itest.js.snap @@ -2,7 +2,7 @@ exports[`LogBoxButton should render Pressable and pass through props 1`] = ` diff --git a/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxInspector-itest.js.snap b/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxInspector-itest.js.snap index 8a23c5601517..ed6afb4fa4e3 100644 --- a/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxInspector-itest.js.snap +++ b/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxInspector-itest.js.snap @@ -10,7 +10,7 @@ exports[`LogBoxInspector should render fatal with selectedIndex 2 1`] = ` backgroundColor="rgba(243, 83, 105, 1)" /> Log 3 of 3 @@ -98,6 +100,7 @@ exports[`LogBoxInspector should render fatal with selectedIndex 2 1`] = ` foregroundColor="rgba(255, 255, 255, 1)" includeFontPadding="false" lineHeight="20" + maxFontSizeMultiplier="1.5" nativeID="logbox_message_contents_text" overflow="hidden" paddingBottom="10" @@ -109,6 +112,7 @@ exports[`LogBoxInspector should render fatal with selectedIndex 2 1`] = ` foregroundColor="rgba(255, 255, 255, 1)" layoutDirection="ltr" lineHeight="20" + maxFontSizeMultiplier="1.5" > Some kind of message (third) @@ -128,7 +132,7 @@ exports[`LogBoxInspector should render fatal with selectedIndex 2 1`] = ` flexDirection="row" > @@ -139,13 +143,14 @@ exports[`LogBoxInspector should render fatal with selectedIndex 2 1`] = ` foregroundColor="rgba(255, 255, 255, 1)" includeFontPadding="false" lineHeight="20" + maxFontSizeMultiplier="1.5" overflow="hidden" > Dismiss @@ -156,13 +161,14 @@ exports[`LogBoxInspector should render fatal with selectedIndex 2 1`] = ` foregroundColor="rgba(255, 255, 255, 1)" includeFontPadding="false" lineHeight="20" + maxFontSizeMultiplier="1.5" overflow="hidden" > Minimize @@ -173,6 +179,7 @@ exports[`LogBoxInspector should render fatal with selectedIndex 2 1`] = ` foregroundColor="rgba(255, 255, 255, 1)" includeFontPadding="false" lineHeight="20" + maxFontSizeMultiplier="1.5" overflow="hidden" > Copy @@ -194,7 +201,7 @@ exports[`LogBoxInspector should render warning with selectedIndex 0 1`] = ` backgroundColor="rgba(250, 186, 48, 1)" /> Log 1 of 3 @@ -282,6 +291,7 @@ exports[`LogBoxInspector should render warning with selectedIndex 0 1`] = ` foregroundColor="rgba(255, 255, 255, 1)" includeFontPadding="false" lineHeight="20" + maxFontSizeMultiplier="1.5" nativeID="logbox_message_contents_text" overflow="hidden" paddingBottom="10" @@ -293,6 +303,7 @@ exports[`LogBoxInspector should render warning with selectedIndex 0 1`] = ` foregroundColor="rgba(255, 255, 255, 1)" layoutDirection="ltr" lineHeight="20" + maxFontSizeMultiplier="1.5" > Some kind of message (first) @@ -312,7 +323,7 @@ exports[`LogBoxInspector should render warning with selectedIndex 0 1`] = ` flexDirection="row" > @@ -323,13 +334,14 @@ exports[`LogBoxInspector should render warning with selectedIndex 0 1`] = ` foregroundColor="rgba(255, 255, 255, 1)" includeFontPadding="false" lineHeight="20" + maxFontSizeMultiplier="1.5" overflow="hidden" > Dismiss @@ -340,13 +352,14 @@ exports[`LogBoxInspector should render warning with selectedIndex 0 1`] = ` foregroundColor="rgba(255, 255, 255, 1)" includeFontPadding="false" lineHeight="20" + maxFontSizeMultiplier="1.5" overflow="hidden" > Minimize @@ -357,6 +370,7 @@ exports[`LogBoxInspector should render warning with selectedIndex 0 1`] = ` foregroundColor="rgba(255, 255, 255, 1)" includeFontPadding="false" lineHeight="20" + maxFontSizeMultiplier="1.5" overflow="hidden" > Copy diff --git a/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxInspectorCodeFrame-itest.js.snap b/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxInspectorCodeFrame-itest.js.snap index 602fd9deda7d..f11a2393b287 100644 --- a/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxInspectorCodeFrame-itest.js.snap +++ b/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxInspectorCodeFrame-itest.js.snap @@ -12,6 +12,7 @@ exports[`LogBoxInspectorCodeFrame should dedupe if code frames are the same 1`] foregroundColor="rgba(255, 255, 255, 1)" includeFontPadding="false" lineHeight="20" + maxFontSizeMultiplier="1.5" overflow="hidden" > Source @@ -44,6 +45,7 @@ exports[`LogBoxInspectorCodeFrame should dedupe if code frames are the same 1`] fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > ‎ 63 | function ConsoleWithThrow() { @@ -64,6 +67,7 @@ exports[`LogBoxInspectorCodeFrame should dedupe if code frames are the same 1`] fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > ‎ 64 | console.error('hit'); @@ -84,6 +89,7 @@ exports[`LogBoxInspectorCodeFrame should dedupe if code frames are the same 1`] fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > ‎> 65 | throw new Error('test'); @@ -104,6 +111,7 @@ exports[`LogBoxInspectorCodeFrame should dedupe if code frames are the same 1`] fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > ‎ | ^ @@ -124,6 +133,7 @@ exports[`LogBoxInspectorCodeFrame should dedupe if code frames are the same 1`] fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > ‎ 66 | } @@ -144,6 +155,7 @@ exports[`LogBoxInspectorCodeFrame should dedupe if code frames are the same 1`] fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > ‎ 67 | @@ -164,6 +177,7 @@ exports[`LogBoxInspectorCodeFrame should dedupe if code frames are the same 1`] fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > ‎ 68 | @@ -180,7 +195,7 @@ exports[`LogBoxInspectorCodeFrame should dedupe if code frames are the same 1`] CrashReactApp.js (65:19) @@ -216,6 +232,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame 1`] = ` foregroundColor="rgba(255, 255, 255, 1)" includeFontPadding="false" lineHeight="20" + maxFontSizeMultiplier="1.5" overflow="hidden" > Source @@ -248,6 +265,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame 1`] = ` fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > ‎ 197 | }); @@ -268,6 +287,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame 1`] = ` fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > ‎ 198 | @@ -288,6 +309,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame 1`] = ` fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > ‎ > 199 | export default CrashReactApp; @@ -308,6 +331,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame 1`] = ` fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > ‎ | ^ @@ -328,6 +353,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame 1`] = ` fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > ‎ 200 | @@ -344,7 +371,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame 1`] = ` CrashReactApp.js (199:1) @@ -380,6 +408,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame without a location foregroundColor="rgba(255, 255, 255, 1)" includeFontPadding="false" lineHeight="20" + maxFontSizeMultiplier="1.5" overflow="hidden" > Source @@ -412,6 +441,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame without a location fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > ‎ 197 | }); @@ -432,6 +463,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame without a location fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > ‎ 198 | @@ -452,6 +485,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame without a location fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > ‎ > 199 | export default CrashReactApp; @@ -472,6 +507,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame without a location fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > ‎ | ^ @@ -492,6 +529,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame without a location fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > ‎ 200 | @@ -508,7 +547,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame without a location CrashReactApp.js @@ -544,6 +584,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen foregroundColor="rgba(255, 255, 255, 1)" includeFontPadding="false" lineHeight="20" + maxFontSizeMultiplier="1.5" overflow="hidden" > Sources @@ -576,6 +617,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > ‎ 62 | @@ -596,6 +639,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > ‎ 63 | function ConsoleWithThrow() { @@ -616,6 +661,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > ‎> 64 | console.error('hit'); @@ -636,6 +683,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > ‎ | ^ @@ -656,6 +705,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > ‎ 65 | throw new Error('test'); @@ -676,6 +727,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > ‎ 66 | } @@ -696,6 +749,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > ‎ 67 | @@ -712,7 +767,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen CrashReactApp.js (64:17) @@ -761,6 +817,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > ‎ 89 | @@ -781,6 +839,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > ‎ 90 | function Child() { @@ -801,6 +861,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > ‎> 91 | return <ConsoleWithThrow />; @@ -821,6 +883,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > ‎ | ^ @@ -841,6 +905,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > ‎ 92 | } @@ -861,6 +927,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > ‎ 93 | @@ -881,6 +949,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > ‎ 94 | @@ -897,7 +967,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen CrashReactApp.js (90:11) diff --git a/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxInspectorFooter-itest.js.snap b/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxInspectorFooter-itest.js.snap index 7b020143b988..e9dfe66c817d 100644 --- a/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxInspectorFooter-itest.js.snap +++ b/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxInspectorFooter-itest.js.snap @@ -14,6 +14,7 @@ exports[`LogBoxInspectorFooter should render no buttons and a message for syntax foregroundColor="rgba(255, 255, 255, 0.6)" height="48" lineHeight="20" + maxFontSizeMultiplier="1.5" nativeID="logbox_dismissable_text" overflow="hidden" paddingBottom="50" @@ -31,7 +32,7 @@ exports[`LogBoxInspectorFooter should render two buttons for error 1`] = ` flexDirection="row" > @@ -42,13 +43,14 @@ exports[`LogBoxInspectorFooter should render two buttons for error 1`] = ` foregroundColor="rgba(255, 255, 255, 1)" includeFontPadding="false" lineHeight="20" + maxFontSizeMultiplier="1.5" overflow="hidden" > Dismiss @@ -59,13 +61,14 @@ exports[`LogBoxInspectorFooter should render two buttons for error 1`] = ` foregroundColor="rgba(255, 255, 255, 1)" includeFontPadding="false" lineHeight="20" + maxFontSizeMultiplier="1.5" overflow="hidden" > Minimize @@ -76,6 +79,7 @@ exports[`LogBoxInspectorFooter should render two buttons for error 1`] = ` foregroundColor="rgba(255, 255, 255, 1)" includeFontPadding="false" lineHeight="20" + maxFontSizeMultiplier="1.5" overflow="hidden" > Copy @@ -90,7 +94,7 @@ exports[`LogBoxInspectorFooter should render two buttons for fatal 1`] = ` flexDirection="row" > @@ -101,13 +105,14 @@ exports[`LogBoxInspectorFooter should render two buttons for fatal 1`] = ` foregroundColor="rgba(255, 255, 255, 1)" includeFontPadding="false" lineHeight="20" + maxFontSizeMultiplier="1.5" overflow="hidden" > Dismiss @@ -118,13 +123,14 @@ exports[`LogBoxInspectorFooter should render two buttons for fatal 1`] = ` foregroundColor="rgba(255, 255, 255, 1)" includeFontPadding="false" lineHeight="20" + maxFontSizeMultiplier="1.5" overflow="hidden" > Minimize @@ -135,6 +141,7 @@ exports[`LogBoxInspectorFooter should render two buttons for fatal 1`] = ` foregroundColor="rgba(255, 255, 255, 1)" includeFontPadding="false" lineHeight="20" + maxFontSizeMultiplier="1.5" overflow="hidden" > Copy @@ -149,7 +156,7 @@ exports[`LogBoxInspectorFooter should render two buttons for warning 1`] = ` flexDirection="row" > @@ -160,13 +167,14 @@ exports[`LogBoxInspectorFooter should render two buttons for warning 1`] = ` foregroundColor="rgba(255, 255, 255, 1)" includeFontPadding="false" lineHeight="20" + maxFontSizeMultiplier="1.5" overflow="hidden" > Dismiss @@ -177,13 +185,14 @@ exports[`LogBoxInspectorFooter should render two buttons for warning 1`] = ` foregroundColor="rgba(255, 255, 255, 1)" includeFontPadding="false" lineHeight="20" + maxFontSizeMultiplier="1.5" overflow="hidden" > Minimize @@ -194,6 +203,7 @@ exports[`LogBoxInspectorFooter should render two buttons for warning 1`] = ` foregroundColor="rgba(255, 255, 255, 1)" includeFontPadding="false" lineHeight="20" + maxFontSizeMultiplier="1.5" overflow="hidden" > Copy diff --git a/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxInspectorHeader-itest.js.snap b/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxInspectorHeader-itest.js.snap index dc54b15cfa9a..1e9584bc7458 100644 --- a/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxInspectorHeader-itest.js.snap +++ b/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxInspectorHeader-itest.js.snap @@ -6,7 +6,7 @@ exports[`LogBoxInspectorHeader should render both buttons for two total 1`] = ` backgroundColor="rgba(250, 186, 48, 1)" /> Log 2 of 2 @@ -126,6 +128,7 @@ exports[`LogBoxInspectorHeader should render syntax error header 1`] = ` foregroundColor="rgba(255, 255, 255, 1)" includeFontPadding="false" lineHeight="20" + maxFontSizeMultiplier="1.5" nativeID="logbox_header_title_text" overflow="hidden" > @@ -158,6 +161,7 @@ exports[`LogBoxInspectorHeader should render two buttons for three or more total foregroundColor="rgba(255, 255, 255, 1)" includeFontPadding="false" lineHeight="20" + maxFontSizeMultiplier="1.5" nativeID="logbox_header_title_text" overflow="hidden" > diff --git a/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxInspectorMessageHeader-itest.js.snap b/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxInspectorMessageHeader-itest.js.snap index 956541399abb..2c6876dc4e9d 100644 --- a/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxInspectorMessageHeader-itest.js.snap +++ b/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxInspectorMessageHeader-itest.js.snap @@ -15,6 +15,7 @@ exports[`LogBoxInspectorMessageHeader should not render "See More" if expanded 1 foregroundColor="rgba(250, 186, 48, 1)" includeFontPadding="false" lineHeight="28" + maxFontSizeMultiplier="1.5" nativeID="logbox_message_title_text" overflow="hidden" > @@ -28,6 +29,7 @@ exports[`LogBoxInspectorMessageHeader should not render "See More" if expanded 1 foregroundColor="rgba(255, 255, 255, 1)" includeFontPadding="false" lineHeight="20" + maxFontSizeMultiplier="1.5" nativeID="logbox_message_contents_text" overflow="hidden" paddingBottom="10" @@ -39,6 +41,7 @@ exports[`LogBoxInspectorMessageHeader should not render "See More" if expanded 1 foregroundColor="rgba(255, 255, 255, 1)" layoutDirection="ltr" lineHeight="20" + maxFontSizeMultiplier="1.5" > ############################################################################################################################################################################################################################################################################################################# @@ -61,6 +64,7 @@ exports[`LogBoxInspectorMessageHeader should not render See More button for shor foregroundColor="rgba(250, 186, 48, 1)" includeFontPadding="false" lineHeight="28" + maxFontSizeMultiplier="1.5" nativeID="logbox_message_title_text" overflow="hidden" > @@ -74,6 +78,7 @@ exports[`LogBoxInspectorMessageHeader should not render See More button for shor foregroundColor="rgba(255, 255, 255, 1)" includeFontPadding="false" lineHeight="20" + maxFontSizeMultiplier="1.5" nativeID="logbox_message_contents_text" overflow="hidden" paddingBottom="10" @@ -85,6 +90,7 @@ exports[`LogBoxInspectorMessageHeader should not render See More button for shor foregroundColor="rgba(255, 255, 255, 1)" layoutDirection="ltr" lineHeight="20" + maxFontSizeMultiplier="1.5" > Short @@ -107,6 +113,7 @@ exports[`LogBoxInspectorMessageHeader should render "See More" if collapsed 1`] foregroundColor="rgba(250, 186, 48, 1)" includeFontPadding="false" lineHeight="28" + maxFontSizeMultiplier="1.5" nativeID="logbox_message_title_text" overflow="hidden" > @@ -120,6 +127,7 @@ exports[`LogBoxInspectorMessageHeader should render "See More" if collapsed 1`] foregroundColor="rgba(255, 255, 255, 1)" includeFontPadding="false" lineHeight="20" + maxFontSizeMultiplier="1.5" nativeID="logbox_message_contents_text" overflow="hidden" paddingBottom="10" @@ -131,6 +139,7 @@ exports[`LogBoxInspectorMessageHeader should render "See More" if collapsed 1`] foregroundColor="rgba(255, 255, 255, 1)" layoutDirection="ltr" lineHeight="20" + maxFontSizeMultiplier="1.5" > ############################################################################################################################################################################################################################################################################################################ @@ -143,6 +152,7 @@ exports[`LogBoxInspectorMessageHeader should render "See More" if collapsed 1`] isPressable="true" layoutDirection="ltr" lineHeight="12" + maxFontSizeMultiplier="1.5" > ... See More @@ -165,6 +175,7 @@ exports[`LogBoxInspectorMessageHeader should render error 1`] = ` foregroundColor="rgba(243, 83, 105, 1)" includeFontPadding="false" lineHeight="28" + maxFontSizeMultiplier="1.5" nativeID="logbox_message_title_text" overflow="hidden" > @@ -178,6 +189,7 @@ exports[`LogBoxInspectorMessageHeader should render error 1`] = ` foregroundColor="rgba(255, 255, 255, 1)" includeFontPadding="false" lineHeight="20" + maxFontSizeMultiplier="1.5" nativeID="logbox_message_contents_text" overflow="hidden" paddingBottom="10" @@ -189,6 +201,7 @@ exports[`LogBoxInspectorMessageHeader should render error 1`] = ` foregroundColor="rgba(255, 255, 255, 1)" layoutDirection="ltr" lineHeight="20" + maxFontSizeMultiplier="1.5" > Some error message @@ -211,6 +224,7 @@ exports[`LogBoxInspectorMessageHeader should render fatal 1`] = ` foregroundColor="rgba(243, 83, 105, 1)" includeFontPadding="false" lineHeight="28" + maxFontSizeMultiplier="1.5" nativeID="logbox_message_title_text" overflow="hidden" > @@ -224,6 +238,7 @@ exports[`LogBoxInspectorMessageHeader should render fatal 1`] = ` foregroundColor="rgba(255, 255, 255, 1)" includeFontPadding="false" lineHeight="20" + maxFontSizeMultiplier="1.5" nativeID="logbox_message_contents_text" overflow="hidden" paddingBottom="10" @@ -235,6 +250,7 @@ exports[`LogBoxInspectorMessageHeader should render fatal 1`] = ` foregroundColor="rgba(255, 255, 255, 1)" layoutDirection="ltr" lineHeight="20" + maxFontSizeMultiplier="1.5" > Some fatal message @@ -257,6 +273,7 @@ exports[`LogBoxInspectorMessageHeader should render syntax error 1`] = ` foregroundColor="rgba(243, 83, 105, 1)" includeFontPadding="false" lineHeight="28" + maxFontSizeMultiplier="1.5" nativeID="logbox_message_title_text" overflow="hidden" > @@ -270,6 +287,7 @@ exports[`LogBoxInspectorMessageHeader should render syntax error 1`] = ` foregroundColor="rgba(255, 255, 255, 1)" includeFontPadding="false" lineHeight="20" + maxFontSizeMultiplier="1.5" nativeID="logbox_message_contents_text" overflow="hidden" paddingBottom="10" @@ -281,6 +299,7 @@ exports[`LogBoxInspectorMessageHeader should render syntax error 1`] = ` foregroundColor="rgba(255, 255, 255, 1)" layoutDirection="ltr" lineHeight="20" + maxFontSizeMultiplier="1.5" > Some syntax error message diff --git a/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxInspectorReactFrames-itest.js.snap b/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxInspectorReactFrames-itest.js.snap index 07a40e770a84..51d8d73fc797 100644 --- a/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxInspectorReactFrames-itest.js.snap +++ b/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxInspectorReactFrames-itest.js.snap @@ -12,12 +12,13 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with ful foregroundColor="rgba(255, 255, 255, 1)" includeFontPadding="false" lineHeight="20" + maxFontSizeMultiplier="1.5" overflow="hidden" > Component Stack @@ -41,6 +43,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with ful foregroundColor="rgba(255, 255, 255, 0.4)" layoutDirection="ltr" lineHeight="18" + maxFontSizeMultiplier="1.5" > < @@ -52,6 +55,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with ful foregroundColor="rgba(255, 255, 255, 0.4)" layoutDirection="ltr" lineHeight="18" + maxFontSizeMultiplier="1.5" > /> @@ -65,6 +69,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with ful foregroundColor="rgba(255, 255, 255, 0.701961)" includeFontPadding="false" lineHeight="16" + maxFontSizeMultiplier="1.5" overflow="hidden" paddingLeft="10" > @@ -72,7 +77,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with ful Component Stack @@ -133,6 +141,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with mor foregroundColor="rgba(255, 255, 255, 0.4)" layoutDirection="ltr" lineHeight="18" + maxFontSizeMultiplier="1.5" > < @@ -144,6 +153,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with mor foregroundColor="rgba(255, 255, 255, 0.4)" layoutDirection="ltr" lineHeight="18" + maxFontSizeMultiplier="1.5" > /> @@ -157,6 +167,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with mor foregroundColor="rgba(255, 255, 255, 0.701961)" includeFontPadding="false" lineHeight="16" + maxFontSizeMultiplier="1.5" overflow="hidden" paddingLeft="10" > @@ -164,7 +175,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with mor @@ -188,6 +200,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with mor foregroundColor="rgba(255, 255, 255, 0.4)" layoutDirection="ltr" lineHeight="18" + maxFontSizeMultiplier="1.5" > < @@ -199,6 +212,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with mor foregroundColor="rgba(255, 255, 255, 0.4)" layoutDirection="ltr" lineHeight="18" + maxFontSizeMultiplier="1.5" > /> @@ -212,6 +226,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with mor foregroundColor="rgba(255, 255, 255, 0.701961)" includeFontPadding="false" lineHeight="16" + maxFontSizeMultiplier="1.5" overflow="hidden" paddingLeft="10" > @@ -219,7 +234,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with mor @@ -243,6 +259,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with mor foregroundColor="rgba(255, 255, 255, 0.4)" layoutDirection="ltr" lineHeight="18" + maxFontSizeMultiplier="1.5" > < @@ -254,6 +271,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with mor foregroundColor="rgba(255, 255, 255, 0.4)" layoutDirection="ltr" lineHeight="18" + maxFontSizeMultiplier="1.5" > /> @@ -267,6 +285,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with mor foregroundColor="rgba(255, 255, 255, 0.701961)" includeFontPadding="false" lineHeight="16" + maxFontSizeMultiplier="1.5" overflow="hidden" paddingLeft="10" > @@ -274,7 +293,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with mor Component Stack @@ -337,6 +359,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with par foregroundColor="rgba(255, 255, 255, 0.4)" layoutDirection="ltr" lineHeight="18" + maxFontSizeMultiplier="1.5" > < @@ -348,6 +371,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with par foregroundColor="rgba(255, 255, 255, 0.4)" layoutDirection="ltr" lineHeight="18" + maxFontSizeMultiplier="1.5" > /> @@ -361,6 +385,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with par foregroundColor="rgba(255, 255, 255, 0.701961)" includeFontPadding="false" lineHeight="16" + maxFontSizeMultiplier="1.5" overflow="hidden" paddingLeft="10" > @@ -368,7 +393,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with par Component Stack @@ -412,6 +439,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames without foregroundColor="rgba(255, 255, 255, 1)" includeFontPadding="false" lineHeight="18" + maxFontSizeMultiplier="1.5" nativeID="logbox_component_stack_frame_text" overflow="hidden" > @@ -422,6 +450,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames without foregroundColor="rgba(255, 255, 255, 0.4)" layoutDirection="ltr" lineHeight="18" + maxFontSizeMultiplier="1.5" > < @@ -433,6 +462,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames without foregroundColor="rgba(255, 255, 255, 0.4)" layoutDirection="ltr" lineHeight="18" + maxFontSizeMultiplier="1.5" > /> @@ -446,13 +476,14 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames without foregroundColor="rgba(255, 255, 255, 0.701961)" includeFontPadding="false" lineHeight="16" + maxFontSizeMultiplier="1.5" overflow="hidden" paddingLeft="10" > MyComponentFile.js:1 Test Section @@ -51,6 +52,7 @@ exports[`LogBoxInspectorSection should render with only heading 1`] = ` foregroundColor="rgba(255, 255, 255, 1)" includeFontPadding="false" lineHeight="20" + maxFontSizeMultiplier="1.5" overflow="hidden" > Test Section diff --git a/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxInspectorSourceMapStatus-itest.js.snap b/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxInspectorSourceMapStatus-itest.js.snap index 0a5f7454fb42..16cb4643aebc 100644 --- a/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxInspectorSourceMapStatus-itest.js.snap +++ b/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxInspectorSourceMapStatus-itest.js.snap @@ -2,7 +2,7 @@ exports[`LogBoxInspectorSourceMapStatus should render for failed 1`] = ` Source Map @@ -38,7 +39,7 @@ exports[`LogBoxInspectorSourceMapStatus should render for failed 1`] = ` exports[`LogBoxInspectorSourceMapStatus should render for pending 1`] = ` Source Map diff --git a/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxInspectorStackFrame-itest.js.snap b/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxInspectorStackFrame-itest.js.snap index 4b462cfd5477..fa299741f6e0 100644 --- a/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxInspectorStackFrame-itest.js.snap +++ b/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxInspectorStackFrame-itest.js.snap @@ -2,7 +2,7 @@ exports[`LogBoxInspectorStackFrame should render collapsed stack frame with dimmed text 1`] = ` @@ -31,6 +32,7 @@ exports[`LogBoxInspectorStackFrame should render collapsed stack frame with dimm foregroundColor="rgba(255, 255, 255, 0.4)" includeFontPadding="false" lineHeight="16" + maxFontSizeMultiplier="1.5" maximumNumberOfLines="1" overflow="hidden" paddingLeft="10" @@ -42,7 +44,7 @@ exports[`LogBoxInspectorStackFrame should render collapsed stack frame with dimm exports[`LogBoxInspectorStackFrame should render stack frame 1`] = ` @@ -71,6 +74,7 @@ exports[`LogBoxInspectorStackFrame should render stack frame 1`] = ` foregroundColor="rgba(255, 255, 255, 0.8)" includeFontPadding="false" lineHeight="16" + maxFontSizeMultiplier="1.5" maximumNumberOfLines="1" overflow="hidden" paddingLeft="10" @@ -82,7 +86,7 @@ exports[`LogBoxInspectorStackFrame should render stack frame 1`] = ` exports[`LogBoxInspectorStackFrame should render stack frame without press feedback 1`] = ` @@ -111,6 +116,7 @@ exports[`LogBoxInspectorStackFrame should render stack frame without press feedb foregroundColor="rgba(255, 255, 255, 0.8)" includeFontPadding="false" lineHeight="16" + maxFontSizeMultiplier="1.5" maximumNumberOfLines="1" overflow="hidden" paddingLeft="10" diff --git a/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxInspectorStackFrames-itest.js.snap b/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxInspectorStackFrames-itest.js.snap index b0c3f135b77d..578cf1c2c040 100644 --- a/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxInspectorStackFrames-itest.js.snap +++ b/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxInspectorStackFrames-itest.js.snap @@ -14,6 +14,7 @@ exports[`LogBoxInspectorStackFrames should render stack frames with 1 frame coll foregroundColor="rgba(255, 255, 255, 1)" includeFontPadding="false" lineHeight="20" + maxFontSizeMultiplier="1.5" overflow="hidden" > Call Stack @@ -35,12 +36,13 @@ exports[`LogBoxInspectorStackFrames should render stack frames with 1 frame coll includeFontPadding="false" lineHeight="18" marginHorizontal="10" + maxFontSizeMultiplier="1.5" overflow="hidden" > This call stack is not symbolicated. Some features are unavailable such as viewing the function name or tapping to open files. @@ -69,6 +72,7 @@ exports[`LogBoxInspectorStackFrames should render stack frames with 1 frame coll foregroundColor="rgba(255, 255, 255, 0.8)" includeFontPadding="false" lineHeight="16" + maxFontSizeMultiplier="1.5" maximumNumberOfLines="1" overflow="hidden" paddingLeft="10" @@ -77,7 +81,7 @@ exports[`LogBoxInspectorStackFrames should render stack frames with 1 frame coll https://reactnative.dev @@ -22,6 +24,7 @@ exports[`LogBoxMessage Should handle multiple links 1`] = ` and @@ -31,6 +34,7 @@ exports[`LogBoxMessage Should handle multiple links 1`] = ` isHighlighted="false" isPressable="true" layoutDirection="ltr" + maxFontSizeMultiplier="1.5" textDecorationLineType="underline" > https://react.dev @@ -45,6 +49,7 @@ exports[`LogBoxMessage Should handle truncated links 1`] = ` fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > https://reactnative.dev @@ -60,6 +66,7 @@ exports[`LogBoxMessage Should handle truncated links 1`] = ` and https:/ @@ -73,6 +80,7 @@ exports[`LogBoxMessage Should make links tappable 1`] = ` fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > https://reactnative.dev @@ -96,6 +105,7 @@ exports[`LogBoxMessage Should strip "TransformError " without breaking substitut fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > normal @@ -106,6 +116,7 @@ exports[`LogBoxMessage Should strip "TransformError " without breaking substitut fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > substitution @@ -116,6 +127,7 @@ exports[`LogBoxMessage Should strip "TransformError " without breaking substitut fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > normal @@ -130,6 +142,7 @@ exports[`LogBoxMessage should render a plaintext message and clean the content 1 fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1" overflow="hidden" > This should not start with Error: @@ -143,6 +156,7 @@ exports[`LogBoxMessage should render a plaintext message with no substitutions 1 fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1" overflow="hidden" > normal substitution normal @@ -156,6 +170,7 @@ exports[`LogBoxMessage should render message 1`] = ` fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > Some kind of message @@ -169,6 +184,7 @@ exports[`LogBoxMessage should render message truncated to 6 chars 1`] = ` fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > Some @@ -183,6 +199,7 @@ exports[`LogBoxMessage should render message with substitution 1`] = ` fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > normal @@ -193,6 +210,7 @@ exports[`LogBoxMessage should render message with substitution 1`] = ` fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > substitution @@ -203,6 +221,7 @@ exports[`LogBoxMessage should render message with substitution 1`] = ` fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > normal @@ -217,6 +236,7 @@ exports[`LogBoxMessage should render message with substitution, truncating the f fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > nor @@ -231,6 +251,7 @@ exports[`LogBoxMessage should render message with substitution, truncating the s fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > normal @@ -241,6 +262,7 @@ exports[`LogBoxMessage should render message with substitution, truncating the s fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > substi @@ -256,6 +278,7 @@ exports[`LogBoxMessage should render message with substitution, truncating the t fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > normal @@ -266,6 +289,7 @@ exports[`LogBoxMessage should render message with substitution, truncating the t fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > substitution @@ -276,6 +300,7 @@ exports[`LogBoxMessage should render message with substitution, truncating the t fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > no @@ -290,6 +315,7 @@ exports[`LogBoxMessage should render the whole message when maxLength = message fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > Some kind of message @@ -304,6 +330,7 @@ exports[`LogBoxMessage should render the whole message with substitutions when m fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > normal @@ -314,6 +341,7 @@ exports[`LogBoxMessage should render the whole message with substitutions when m fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > substitution @@ -324,6 +352,7 @@ exports[`LogBoxMessage should render the whole message with substitutions when m fontSize="NaN" fontSizeMultiplier="NaN" foregroundColor="rgba(0, 0, 0, 0)" + maxFontSizeMultiplier="1.5" overflow="hidden" > normal diff --git a/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxNotification-itest.js.snap b/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxNotification-itest.js.snap index fa28eb2a2de8..e6479a78e6bf 100644 --- a/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxNotification-itest.js.snap +++ b/packages/react-native/Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxNotification-itest.js.snap @@ -10,7 +10,7 @@ exports[`LogBoxNotification should render log 1`] = ` width="100%" > Some kind of message ', () => { expect( root.getRenderedOutput({props: ['accessibilityState']}).toJSX(), ).toEqual( - + {TEST_TEXT} , ); @@ -818,7 +818,7 @@ describe('', () => { expect(root.getRenderedOutput({props: PRESS_PROPS}).toJSX()) .toMatchInlineSnapshot(` the text diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/AccessibilityPrimitives.h b/packages/react-native/ReactCommon/react/renderer/components/view/AccessibilityPrimitives.h index 4a2ff7e1d4ef..0bd68341d6d7 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/AccessibilityPrimitives.h +++ b/packages/react-native/ReactCommon/react/renderer/components/view/AccessibilityPrimitives.h @@ -60,7 +60,7 @@ inline static bool operator==(const AccessibilityAction &lhs, const Accessibilit struct AccessibilityState { bool disabled{false}; - bool selected{false}; + std::optional selected{std::nullopt}; bool busy{false}; std::optional expanded{std::nullopt}; enum CheckedState { Unchecked, Checked, Mixed, None }; diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/AccessibilityProps.cpp b/packages/react-native/ReactCommon/react/renderer/components/view/AccessibilityProps.cpp index 931c30cdf413..b204a3fd3c58 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/AccessibilityProps.cpp +++ b/packages/react-native/ReactCommon/react/renderer/components/view/AccessibilityProps.cpp @@ -29,7 +29,10 @@ static AccessibilityTraits deriveAccessibilityTraits( } const auto state = accessibilityState.value_or(AccessibilityState{}); - if (state.selected) { + // `selected` is optional: an unset value means the component is not + // selectable at all, which is distinct from an explicit `false`. Neither + // contributes the Selected trait, so both coalesce to `false` here. + if (state.selected.value_or(false)) { traits = traits | AccessibilityTraits::Selected; } if (state.disabled) { diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/platform/android/react/renderer/components/view/HostPlatformViewProps.cpp b/packages/react-native/ReactCommon/react/renderer/components/view/platform/android/react/renderer/components/view/HostPlatformViewProps.cpp index 2ddd629b4cc2..f8eb6df79520 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/platform/android/react/renderer/components/view/HostPlatformViewProps.cpp +++ b/packages/react-native/ReactCommon/react/renderer/components/view/platform/android/react/renderer/components/view/HostPlatformViewProps.cpp @@ -418,7 +418,13 @@ inline static void updateAccessibilityStateProp( } if (!oldState.has_value() || newState->selected != oldState->selected) { - resultState["selected"] = newState->selected; + // Omitting the key when `selected` is unset is what tells the platform the + // component is not selectable. BaseViewManager#setViewState falls back to + // `setSelected(false)` for an absent key, so the rendered result is + // unchanged from when this was a plain `bool`. + if (newState->selected.has_value()) { + resultState["selected"] = newState->selected.value(); + } } if (!oldState.has_value() || newState->busy != oldState->busy) { diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/tests/AccessibilityPropsTest.cpp b/packages/react-native/ReactCommon/react/renderer/components/view/tests/AccessibilityPropsTest.cpp index 7b16331bfad1..38c1d82b9694 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/tests/AccessibilityPropsTest.cpp +++ b/packages/react-native/ReactCommon/react/renderer/components/view/tests/AccessibilityPropsTest.cpp @@ -118,4 +118,71 @@ TEST(AccessibilityPropsTest, inherits_role_traits_when_raw_props_are_absent) { EXPECT_TRUE(hasTrait(props.accessibilityTraits, AccessibilityTraits::Button)); } +// `selected` is tri-state. A host platform needs to tell "this component is +// selectable and currently unselected" (explicit `false`) apart from "this +// component is not selectable at all" (unset), because the two map to +// different accessibility APIs. Windows, for example, only implements +// ISelectionItemProvider for the former. +// See: github.com/facebook/react-native/issues/46988 + +TEST( + AccessibilityPropsTest, + keeps_unset_selected_distinct_from_explicit_false) { + auto unset = parse( + folly::dynamic::object("accessibilityState", folly::dynamic::object())); + auto explicitlyFalse = parse( + folly::dynamic::object( + "accessibilityState", folly::dynamic::object("selected", false))); + auto explicitlyTrue = parse( + folly::dynamic::object( + "accessibilityState", folly::dynamic::object("selected", true))); + + ASSERT_TRUE(unset.accessibilityState.has_value()); + ASSERT_TRUE(explicitlyFalse.accessibilityState.has_value()); + ASSERT_TRUE(explicitlyTrue.accessibilityState.has_value()); + + EXPECT_FALSE(unset.accessibilityState->selected.has_value()); + EXPECT_EQ(explicitlyFalse.accessibilityState->selected, std::optional(false)); + EXPECT_EQ(explicitlyTrue.accessibilityState->selected, std::optional(true)); +} + +TEST(AccessibilityPropsTest, omitted_state_leaves_selected_unset) { + auto props = parse(folly::dynamic::object("nativeID", "abc")); + + EXPECT_FALSE(props.accessibilityState.has_value()); +} + +// Props diffing drives mounting, so the two states must not compare equal — +// otherwise toggling between them would never reach the host view. +TEST(AccessibilityPropsTest, unset_and_explicitly_false_selected_differ) { + auto unset = AccessibilityState{}; + auto explicitlyFalse = AccessibilityState{.selected = false}; + + EXPECT_FALSE(unset == explicitlyFalse); +} + +// Guards the silent-conversion hazard: `std::optional` is contextually +// convertible to `bool`, so a bare `if (state.selected)` still compiles but +// tests engagement rather than value. That would apply the Selected trait to +// an explicitly unselected component. +TEST(AccessibilityPropsTest, explicitly_false_selected_omits_selected_trait) { + auto props = parse( + folly::dynamic::object("role", "button")( + "accessibilityState", folly::dynamic::object("selected", false))); + + EXPECT_TRUE(hasTrait(props.accessibilityTraits, AccessibilityTraits::Button)); + EXPECT_FALSE( + hasTrait(props.accessibilityTraits, AccessibilityTraits::Selected)); +} + +TEST(AccessibilityPropsTest, unset_selected_omits_selected_trait) { + auto props = parse( + folly::dynamic::object("role", "button")( + "accessibilityState", folly::dynamic::object())); + + EXPECT_TRUE(hasTrait(props.accessibilityTraits, AccessibilityTraits::Button)); + EXPECT_FALSE( + hasTrait(props.accessibilityTraits, AccessibilityTraits::Selected)); +} + } // namespace facebook::react diff --git a/scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api b/scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api index eaa69cfd1d93..c28b679c6584 100644 --- a/scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api @@ -6752,9 +6752,9 @@ struct facebook::react::AccessibilityLabelledBy { struct facebook::react::AccessibilityState { public bool busy; public bool disabled; - public bool selected; public facebook::react::AccessibilityState::CheckedState checked; public std::optional expanded; + public std::optional selected; } enum facebook::react::AccessibilityState::CheckedState { diff --git a/scripts/cxx-api/api-snapshots/ReactAndroidNewarchCxx.api b/scripts/cxx-api/api-snapshots/ReactAndroidNewarchCxx.api index 6ef175742788..b5a1b0466f19 100644 --- a/scripts/cxx-api/api-snapshots/ReactAndroidNewarchCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAndroidNewarchCxx.api @@ -6562,9 +6562,9 @@ struct facebook::react::AccessibilityLabelledBy { struct facebook::react::AccessibilityState { public bool busy; public bool disabled; - public bool selected; public facebook::react::AccessibilityState::CheckedState checked; public std::optional expanded; + public std::optional selected; } enum facebook::react::AccessibilityState::CheckedState { diff --git a/scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api b/scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api index 0bfdc66232f0..4909bc99e6e7 100644 --- a/scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api @@ -6743,9 +6743,9 @@ struct facebook::react::AccessibilityLabelledBy { struct facebook::react::AccessibilityState { public bool busy; public bool disabled; - public bool selected; public facebook::react::AccessibilityState::CheckedState checked; public std::optional expanded; + public std::optional selected; } enum facebook::react::AccessibilityState::CheckedState { diff --git a/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api index 2a73a5e57478..977012400615 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api @@ -8920,9 +8920,9 @@ struct facebook::react::AccessibilityLabelledBy { struct facebook::react::AccessibilityState { public bool busy; public bool disabled; - public bool selected; public facebook::react::AccessibilityState::CheckedState checked; public std::optional expanded; + public std::optional selected; } enum facebook::react::AccessibilityState::CheckedState { diff --git a/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api index 4f824f13b946..26b4fef4c1e7 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api @@ -8762,9 +8762,9 @@ struct facebook::react::AccessibilityLabelledBy { struct facebook::react::AccessibilityState { public bool busy; public bool disabled; - public bool selected; public facebook::react::AccessibilityState::CheckedState checked; public std::optional expanded; + public std::optional selected; } enum facebook::react::AccessibilityState::CheckedState { diff --git a/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api index 917a850355c4..c9b332d6b537 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api @@ -8911,9 +8911,9 @@ struct facebook::react::AccessibilityLabelledBy { struct facebook::react::AccessibilityState { public bool busy; public bool disabled; - public bool selected; public facebook::react::AccessibilityState::CheckedState checked; public std::optional expanded; + public std::optional selected; } enum facebook::react::AccessibilityState::CheckedState { diff --git a/scripts/cxx-api/api-snapshots/ReactCommonDebugCxx.api b/scripts/cxx-api/api-snapshots/ReactCommonDebugCxx.api index f7482dddbc3c..b9dd6c568822 100644 --- a/scripts/cxx-api/api-snapshots/ReactCommonDebugCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactCommonDebugCxx.api @@ -5073,9 +5073,9 @@ struct facebook::react::AccessibilityLabelledBy { struct facebook::react::AccessibilityState { public bool busy; public bool disabled; - public bool selected; public facebook::react::AccessibilityState::CheckedState checked; public std::optional expanded; + public std::optional selected; } enum facebook::react::AccessibilityState::CheckedState { diff --git a/scripts/cxx-api/api-snapshots/ReactCommonNewarchCxx.api b/scripts/cxx-api/api-snapshots/ReactCommonNewarchCxx.api index c1a206b292de..103853254317 100644 --- a/scripts/cxx-api/api-snapshots/ReactCommonNewarchCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactCommonNewarchCxx.api @@ -4923,9 +4923,9 @@ struct facebook::react::AccessibilityLabelledBy { struct facebook::react::AccessibilityState { public bool busy; public bool disabled; - public bool selected; public facebook::react::AccessibilityState::CheckedState checked; public std::optional expanded; + public std::optional selected; } enum facebook::react::AccessibilityState::CheckedState { diff --git a/scripts/cxx-api/api-snapshots/ReactCommonReleaseCxx.api b/scripts/cxx-api/api-snapshots/ReactCommonReleaseCxx.api index d39ff62ad642..03199a6de007 100644 --- a/scripts/cxx-api/api-snapshots/ReactCommonReleaseCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactCommonReleaseCxx.api @@ -5064,9 +5064,9 @@ struct facebook::react::AccessibilityLabelledBy { struct facebook::react::AccessibilityState { public bool busy; public bool disabled; - public bool selected; public facebook::react::AccessibilityState::CheckedState checked; public std::optional expanded; + public std::optional selected; } enum facebook::react::AccessibilityState::CheckedState {