|
44 | 44 | static NSString* const FBExclusionAttributeEnabled = @"enabled"; |
45 | 45 | static NSString* const FBExclusionAttributeVisible = @"visible"; |
46 | 46 | static NSString* const FBExclusionAttributeAccessible = @"accessible"; |
| 47 | +static NSString* const FBExclusionAttributeNativeAccessibilityElement = @"nativeAccessibilityElement"; |
47 | 48 | static NSString* const FBExclusionAttributeFocused = @"focused"; |
48 | 49 | static NSString* const FBExclusionAttributePlaceholderValue = @"placeholderValue"; |
49 | 50 | static NSString* const FBExclusionAttributeNativeFrame = @"nativeFrame"; |
50 | 51 | static NSString* const FBExclusionAttributeTraits = @"traits"; |
51 | 52 | static NSString* const FBExclusionAttributeMinValue = @"minValue"; |
52 | 53 | static NSString* const FBExclusionAttributeMaxValue = @"maxValue"; |
53 | 54 |
|
| 55 | +static NSString *FBJsonPrefixedAttributeKey(NSString *key) |
| 56 | +{ |
| 57 | + return [NSString stringWithFormat:@"is%@%@", |
| 58 | + [[key substringToIndex:1] uppercaseString], |
| 59 | + [key substringFromIndex:1]]; |
| 60 | +} |
| 61 | + |
54 | 62 | _Nullable id extractIssueProperty(id issue, NSString *propertyName) { |
55 | 63 | SEL selector = NSSelectorFromString(propertyName); |
56 | 64 | NSMethodSignature *methodSignature = [issue methodSignatureForSelector:selector]; |
@@ -223,7 +231,7 @@ + (NSDictionary *)dictionaryForElement:(id<FBXCElementSnapshot>)snapshot |
223 | 231 | if ([nonPrefixedKeys containsObject:key]) { |
224 | 232 | info[key] = value; |
225 | 233 | } else { |
226 | | - info[[NSString stringWithFormat:@"is%@", [key capitalizedString]]] = value; |
| 234 | + info[FBJsonPrefixedAttributeKey(key)] = value; |
227 | 235 | } |
228 | 236 | } |
229 | 237 | } |
@@ -268,6 +276,9 @@ + (NSDictionary *)dictionaryForElement:(id<FBXCElementSnapshot>)snapshot |
268 | 276 | }, |
269 | 277 | FBExclusionAttributeAccessible: ^{ |
270 | 278 | return [@([wrappedSnapshot isWDAccessible]) stringValue]; |
| 279 | + }, |
| 280 | + FBExclusionAttributeNativeAccessibilityElement: ^{ |
| 281 | + return [@([wrappedSnapshot isWDNativeAccessibilityElement]) stringValue]; |
271 | 282 | }, |
272 | 283 | FBExclusionAttributeFocused: ^{ |
273 | 284 | return [@([wrappedSnapshot isWDFocused]) stringValue]; |
|
0 commit comments