Skip to content

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

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

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

@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!

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
@kimseongchan0914
kimseongchan0914 force-pushed the fix/ios-fabric-aria-expanded-collapsed branch from 5e7aa26 to 9e85d9e Compare October 5, 2026 15:30
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 5, 2026
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Oct 5, 2026
@Abbondanzo

Copy link
Copy Markdown
Contributor

#58748 has already made this change, should be fixed now

@kimseongchan0914

Copy link
Copy Markdown
Author

Closing, since #58748 already landed this fix on main. Thanks for the pointer, @Abbondanzo.

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

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

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)

2 participants