Skip to content

Commit

Permalink
Map accessibilityRole: grid to UIAccessibilityTraitNone
Browse files Browse the repository at this point in the history
Summary:
D38121921 (5ddb997) added a grid accessibilityRole to Flow typings and RNTester example shared with iOS. It it forwarded on Android, but doesn't have an equivalent UIAccessibilityTrait mapping.`RNTesterSnapshotTests/testScrollViewExample` reports an error:
```
Failure: RedBox errors: (
    "Error setting property 'accessibilityRole' of RCTScrollView with tag #125: Invalid UIAccessibilityTraits 'grid'. should be one of: (
    adjustable,
====================== 38 lines skipped ======================
) (NSInternalInconsistencyException)
Path: <unknown>
Line: 0
```

This adds the grid mapping, which I think should fix this error.

Changelog:
[ios][Fixed] - Map `accessibilityRole: grid` to `UIAccessibilityTraitNone`

Reviewed By: christophpurrer

Differential Revision: D40848904

fbshipit-source-id: 80f72bcd4e4826cc0d535693117a6c1e5fbd1d7d
  • Loading branch information
NickGerleman authored and facebook-github-bot committed Oct 31, 2022
1 parent 84737e0 commit f3d9f2e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions React/Views/RCTViewManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ @implementation RCTConvert (UIAccessibilityTraits)
@"timer" : @(UIAccessibilityTraitNone),
@"toolbar" : @(UIAccessibilityTraitNone),
@"list" : @(UIAccessibilityTraitNone),
@"grid" : @(UIAccessibilityTraitNone),
}),
UIAccessibilityTraitNone,
unsignedLongLongValue)
Expand Down

1 comment on commit f3d9f2e

@fabOnReact
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.