From 9e85d9e41cfcdf10f3cf54525ebc4d29ebfaf41f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=84=B1=EC=B0=AC?= <265934944+kimseongchan0914@users.noreply.github.com> Date: Tue, 6 Oct 2026 00:30:50 +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) {