@craft-native/ios 0.0.183 → 0.0.184
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -6332,9 +6332,17 @@ final class CraftNativeScreenController: UIViewController, UIScrollViewDelegate,
|
|
|
6332
6332
|
view.accessibilityValue = nil
|
|
6333
6333
|
}
|
|
6334
6334
|
let role = props["accessibilityRole"] as? String
|
|
6335
|
-
|
|
6335
|
+
// A scroll view, a list or a group of controls holds what VoiceOver
|
|
6336
|
+
// reads: its label names the group, as a tab strip or a pager's
|
|
6337
|
+
// name, and never stands in for its content. As an element of its
|
|
6338
|
+
// own, a labelled pager hid every page from VoiceOver.
|
|
6339
|
+
let container = ["ScrollView", "FlatList", "SectionList"].contains(type)
|
|
6340
|
+
|| ["tablist", "radiogroup", "list", "menu", "menubar", "toolbar"].contains(role ?? "")
|
|
6341
|
+
view.isAccessibilityElement = !container && role != "none" && (view.accessibilityLabel != nil || role != nil || ["Text", "Button", "Link", "Checkbox", "Image", "ImageBackground", "Video", "TextInput", "Picker", "DatePicker", "Switch", "Slider"].contains(type))
|
|
6342
|
+
view.accessibilityContainerType = container && view.accessibilityLabel != nil ? .semanticGroup : .none
|
|
6336
6343
|
var traits: UIAccessibilityTraits = []
|
|
6337
6344
|
switch role ?? type.lowercased() {
|
|
6345
|
+
case "tablist": traits.insert(.tabBar)
|
|
6338
6346
|
case "button", "checkbox": traits.insert(.button)
|
|
6339
6347
|
case "image": traits.insert(.image)
|
|
6340
6348
|
case "header": traits.insert(.header)
|