Repository navigation
Commit 30032c8
Make invalid accessibility roles non-fatal (#58803)
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: D1228130731 parent 51e9a97 commit 30032c8
2 files changed
Lines changed: 9 additions & 1 deletion
File tree
- packages/react-native/ReactAndroid/src
- main/java/com/facebook/react/uimanager
- test/java/com/facebook/react/uimanager
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
499 | 499 | | |
500 | 500 | | |
501 | 501 | | |
| 502 | + | |
502 | 503 | | |
503 | 504 | | |
504 | 505 | | |
| |||
510 | 511 | | |
511 | 512 | | |
512 | 513 | | |
513 | | - | |
| 514 | + | |
514 | 515 | | |
515 | 516 | | |
516 | 517 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
359 | 366 | | |
360 | 367 | | |
361 | 368 | | |
| |||
0 commit comments