Repository navigation
Commit a27bbe6
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.
Reviewed By: cortinico
Differential Revision: D1228130731 parent 55c951c commit a27bbe6
2 files changed
Lines changed: 16 additions & 1 deletion
File tree
- packages/react-native/ReactAndroid/src
- main/java/com/facebook/react/uimanager
- test/java/com/facebook/react/uimanager
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
499 | 499 | | |
500 | 500 | | |
501 | 501 | | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
502 | 506 | | |
503 | 507 | | |
504 | 508 | | |
| |||
510 | 514 | | |
511 | 515 | | |
512 | 516 | | |
513 | | - | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
514 | 522 | | |
515 | 523 | | |
516 | 524 | | |
| |||
| 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