* [ios] update roles

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

Branch: refs/heads/0.16-dev
Commit: 72e80f92b0d92169298278b0d8de16a1e996e191
Parents: 70d421b
Author: acton393 <zhangxing610...@gmail.com>
Authored: Tue Sep 12 23:54:24 2017 +0800
Committer: acton393 <zhangxing610...@gmail.com>
Committed: Tue Sep 12 23:54:24 2017 +0800

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


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/72e80f92/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 df61f6f..0316321 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXComponent_internal.h
+++ b/ios/sdk/WeexSDK/Sources/Component/WXComponent_internal.h
@@ -64,7 +64,7 @@
     /**
      * accessibility support
      */
-    NSString * _role; //accessibility
+    NSString * _roles; //accessibility
     NSString * _ariaLabel; //accessibilityLabel
     NSString * _ariaHidden; // accessibilityElementsHidden
     NSString * _accessible; // accessible

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/72e80f92/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 254a128..7dd7750 100644
--- a/ios/sdk/WeexSDK/Sources/Model/WXComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Model/WXComponent.m
@@ -113,7 +113,7 @@
             _ariaHidden = [WXConvert NSString:attributes[@"ariaHidden"]];
         }
         if (attributes[@"role"]) {
-            _role = attributes[@"role"];
+            _roles = attributes[@"role"];
         }
         if (attributes[@"ariaLabel"]) {
             _ariaLabel = [WXConvert NSString:attributes[@"ariaLabel"]];
@@ -140,7 +140,7 @@
     return self;
 }
 
-- 
(UIAccessibilityTraits)_parseAccessibilityTraitsWithTraits:(UIAccessibilityTraits)trait
 role:(NSString*)roleStr
+- 
(UIAccessibilityTraits)_parseAccessibilityTraitsWithTraits:(UIAccessibilityTraits)trait
 roles:(NSString*)roleStr
 {
     UIAccessibilityTraits newTrait = trait;
     for (NSString * role in [roleStr componentsSeparatedByString:@" "]) {
@@ -268,8 +268,8 @@
         _view.wx_ref = self.ref;
         _layer.wx_component = self;
         
-        if (_role) {
-            [_view setAccessibilityTraits:[self 
_parseAccessibilityTraitsWithTraits:self.view.accessibilityTraits role:_role]];
+        if (_roles) {
+            [_view setAccessibilityTraits:[self 
_parseAccessibilityTraitsWithTraits:self.view.accessibilityTraits 
roles:_roles]];
         }
         
         if (_testId) {
@@ -621,8 +621,8 @@
 {
     WX_CHECK_COMPONENT_TYPE(self.componentType)
     if (attributes[@"role"]){
-        _role = attributes[@"role"];
-        [self.view setAccessibilityTraits:[self 
_parseAccessibilityTraitsWithTraits:self.view.accessibilityTraits role:_role]];
+        _roles = attributes[@"role"];
+        [self.view setAccessibilityTraits:[self 
_parseAccessibilityTraitsWithTraits:self.view.accessibilityTraits 
roles:_roles]];
     }
     if (attributes[@"ariaHidden"]) {
         _ariaHidden = [WXConvert NSString:attributes[@"ariaHidden"]];

Reply via email to