also looking at this
fix(native): retain keyed controls and correct map and tab chrome
#368
32 files
+449
-100
Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.
| @@ -6574,11 +6574,11 @@ class MainActivity : AppCompatActivity() { | ||
| 6574 | 6574 | } |
| 6575 | 6575 | |
| 6576 | 6576 | private fun applyAccessibility(view: View, props: JSONObject, type: String, fallbackLabel: String) { |
| 6577 | view.tag = fallbackLabel | |
| 6577 | val testId = craftNativeOptionalString(props.opt("testID")) | |
| 6578 | view.tag = testId?.takeIf { it.isNotBlank() } ?: fallbackLabel | |
| 6578 | 6579 | val label = craftNativeOptionalString(props.opt("accessibilityLabel")) |
| 6579 | 6580 | ?: craftNativeOptionalString(props.opt("alt"))?.takeIf { type == "Image" || type == "ImageBackground" } |
| 6580 | 6581 | val value = craftNativeOptionalString(props.opt("accessibilityValue")) |
| 6581 | val testId = craftNativeOptionalString(props.opt("testID")) | |
| 6582 | 6582 | view.contentDescription = when { |
| 6583 | 6583 | label != null && value != null -> "$label, $value" |
| 6584 | 6584 | label != null -> label |