From 5e7aa26ca9847088c510088e1677dbdb632daae8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=84=B1=EC=B0=AC?= Date: Wed, 30 Sep 2026 15:15:31 +0900 Subject: [PATCH] Announce "collapsed" for aria-expanded={false} on iOS New Architecture RCTViewComponentView only added the "expanded" accessibility value when expanded was true, so VoiceOver announced no state for aria-expanded={false}. The old-architecture RCTView announced both states. Add the missing branch, reusing the existing localized "collapsed" string. Fixes #58746 --- .../Mounting/ComponentViews/View/RCTViewComponentView.mm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm b/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm index 61ef98f921cd..200ed2d7f7b9 100644 --- a/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm @@ -1614,9 +1614,11 @@ - (NSString *)accessibilityValue addObject:RCTLocalizedString( "mixed", "a checkbox, radio button, or other widget which is both checked and unchecked")]; } - if (accessibilityState.expanded.value_or(false)) { + if (accessibilityState.expanded.has_value()) { [valueComponents - addObject:RCTLocalizedString("expanded", "a menu, dialog, accordian panel, or other widget which is expanded")]; + addObject:accessibilityState.expanded.value() + ? RCTLocalizedString("expanded", "a menu, dialog, accordian panel, or other widget which is expanded") + : RCTLocalizedString("collapsed", "a menu, dialog, accordian panel, or other widget which is collapsed")]; } if (accessibilityState.busy) {