Commit 3096eb5
authored
Fix duplicate accessibilityLabels on iOS
I came across this because one of my customer's apps was freezing the UI and crashing after spending ~10 seconds when trying to read the accessibilityLabel of a view with a "particularly complex and dynamic view hierarchy". I'm still not entirely sure what the app was doing, but I believe this will sidestep the issue entirely.
I believe this change will also improve both the accessibility and the testability of RN apps, in addition to fixing that crash.
This PR supersedes or fixes facebook#21830, facebook#25963, facebook#24113, facebook#24118, appium/appium#10654, possibly facebook#25220, and probably a few other tickets I haven't identified.
Also worth mentioning that there is very similar code in https://github.com/facebook/react-native/blob/master/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm#L489-L515 - I haven't dug into that as much, but I suspect it should probably get the same treatment. If anyone wants, I can include it in this PR.1 parent 8ce57ec commit 3096eb5
1 file changed
+1
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | 83 | | |
102 | 84 | | |
103 | 85 | | |
| |||
223 | 205 | | |
224 | 206 | | |
225 | 207 | | |
226 | | - | |
| 208 | + | |
227 | 209 | | |
228 | 210 | | |
229 | 211 | | |
| |||
0 commit comments