Skip to content

[iOS] Announce "collapsed" for aria-expanded={false} on New Architecture - #58755

Open
kimseongchan0914 wants to merge 1 commit into
react:mainfrom
kimseongchan0914:fix/ios-fabric-aria-expanded-collapsed
Open

kimseongchan0914 wants to merge 1 commit into
react:mainfrom
kimseongchan0914:fix/ios-fabric-aria-expanded-collapsed

Conversation

@kimseongchan0914

Copy link
Copy Markdown

Summary:

Fixes #58746.

On iOS with the New Architecture, VoiceOver announces no state for an element with aria-expanded={false} (or accessibilityState={{expanded: false}}). For example, a collapsed accordion header is read as "Returns, button", so a VoiceOver user can't tell it apart from an ordinary button.

RCTViewComponentView added the "expanded" accessibility value only when expanded was true. There was no branch for false. The old-architecture RCTView announces both "expanded" and "collapsed", so this is a regression on the New Architecture.

This change adds the missing branch. It reuses the localized "collapsed" string that RCTView.m already uses. When expanded is unset, no state is added, as before.

Changelog:

[IOS] [FIXED] - VoiceOver now announces "collapsed" for aria-expanded={false} on the New Architecture

Test Plan:

Ran:

  • npx clang-format on RCTViewComponentView.mm produced no diff
  • git diff --check HEAD~1 HEAD was clean

Not run yet: an iOS build and a VoiceOver check on device. The expected VoiceOver output for <Pressable role="button" aria-expanded={...}> in RNTester (New Architecture) is:

aria-expanded Before After
false "Returns, button" "Returns, collapsed, button"
true "Returns, expanded, button" unchanged
unset "Returns, button" unchanged

🤖 Generated with Claude Code

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 react#58746
@meta-cla

meta-cla Bot commented Sep 30, 2026

Copy link
Copy Markdown

Hi @kimseongchan0914!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[iOS][New Architecture] VoiceOver never announces "collapsed" for aria-expanded={false} (regression from RCTView)

1 participant