[WEEX-101][iOS] specify voice-over navigation order is column or vertical

Consider an app that shows items in vertical columns. Normally, voiceOver would 
navigate through
these items in horizontal rows. Setting the value of this property to YES on 
the parent element of the
items in the vertical columns causes VoiceOver to respect the app’s grouping 
and navigate them.And
the default of this property is NO.

Bug:101


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/7f49963f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/7f49963f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/7f49963f

Branch: refs/heads/master
Commit: 7f49963f80b63ce0ee2aff78c76e4bd20611b43f
Parents: 78f2312
Author: acton393 <zhangxing610...@gmail.com>
Authored: Wed Nov 15 20:56:47 2017 +0800
Committer: acton393 <zhangxing610...@gmail.com>
Committed: Wed Nov 15 20:56:47 2017 +0800

----------------------------------------------------------------------
 .../WeexSDK/Sources/Component/WXComponent_internal.h    |  1 +
 ios/sdk/WeexSDK/Sources/Model/WXComponent.m             | 12 ++++++++++++
 2 files changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7f49963f/ios/sdk/WeexSDK/Sources/Component/WXComponent_internal.h
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXComponent_internal.h 
b/ios/sdk/WeexSDK/Sources/Component/WXComponent_internal.h
index f1163a9..dc9772b 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXComponent_internal.h
+++ b/ios/sdk/WeexSDK/Sources/Component/WXComponent_internal.h
@@ -70,6 +70,7 @@ typedef id (^WXDataBindingBlock)(NSDictionary *data, BOOL 
*needUpdate);
     NSString * _ariaHidden; // accessibilityElementsHidden
     NSString * _accessible; // accessible
     NSString * _accessibilityHintContent; // hint for the action
+    NSString * _groupAccessibilityChildren; // voice-over navigation order
     NSString * _testId;// just for auto-test
     
     BOOL _accessibilityMagicTapEvent;

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7f49963f/ios/sdk/WeexSDK/Sources/Model/WXComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Model/WXComponent.m 
b/ios/sdk/WeexSDK/Sources/Model/WXComponent.m
index 7ad52f3..a924176 100644
--- a/ios/sdk/WeexSDK/Sources/Model/WXComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Model/WXComponent.m
@@ -126,6 +126,9 @@
         if(attributes[@"accessibilityHint"]) {
             _accessibilityHintContent = [WXConvert 
NSString:attributes[@"accessibilityHint"]];
         }
+        if (attributes[@"groupAccessibilityChildren"]) {
+            _groupAccessibilityChildren = [WXConvert 
NSString:attributes[@"groupAccessibilityChildren"]];
+        }
         
         if (attributes[@"testId"]) {
             _testId = [WXConvert NSString:attributes[@"testId"]];
@@ -366,6 +369,9 @@
         if (_ariaHidden) {
             [_view setAccessibilityElementsHidden:[WXConvert 
BOOL:_ariaHidden]];
         }
+        if (_groupAccessibilityChildren) {
+            [_view setShouldGroupAccessibilityChildren:[WXConvert 
BOOL:_groupAccessibilityChildren]];
+        }
         
         [self _initEvents:self.events];
         [self _initPseudoEvents:_isListenPseudoTouch];
@@ -736,6 +742,12 @@
         [self.view setAccessibilityHint:_accessibilityHintContent];
     }
     
+    if (attributes[@"groupAccessibilityChildren"]) {
+        _groupAccessibilityChildren = [WXConvert 
NSString:attributes[@"groupAccessibilityChildren"]];
+        [self.view setShouldGroupAccessibilityChildren:[WXConvert 
BOOL:_groupAccessibilityChildren]];
+    }
+
+    
     if (attributes[@"testId"]) {
         [self.view setAccessibilityIdentifier:[WXConvert 
NSString:attributes[@"testId"]]];
     }

Reply via email to