Skip to content

Make invalid accessibility roles non-fatal (#58803) - #58803

Open
Abbondanzo wants to merge 1 commit into
react:mainfrom
Abbondanzo:export-D122813073
Open

Abbondanzo wants to merge 1 commit into
react:mainfrom
Abbondanzo:export-D122813073

Conversation

@Abbondanzo

@Abbondanzo Abbondanzo commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary:

AccessibilityRole.fromValue throws for an unrecognized role and can crash Android rendering. Return NONE for unknown values instead. It doesn't make sense to throw here, especially since different platforms like iOS support different values

Changelog:
[Android][Fixed] - Prevent invalid accessibilityRole values from crashing the app.

Differential Revision: D122813073

@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 1, 2026
@meta-codesync

meta-codesync Bot commented Oct 1, 2026

Copy link
Copy Markdown

@Abbondanzo has exported this pull request. If you are a Meta employee, you can view the originating Diff in D122813073.

Summary:

`AccessibilityRole.fromValue` throws for an unrecognized role and can crash Android rendering. Return `NONE` for unknown values instead. It doesn't make sense to throw here, especially since different platforms like iOS support different values

Changelog:
[Android][Fixed] - Prevent invalid `accessibilityRole` values from crashing the app.

Differential Revision: D122813073
@meta-codesync meta-codesync Bot changed the title Make invalid accessibility roles non-fatal Make invalid accessibility roles non-fatal (#58803) Oct 2, 2026

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

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant