Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Support for Entrance/exit from collection by Flatlist #31630

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Libraries/Components/View/ViewAccessibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export type AccessibilityRole =
| 'tab'
| 'tablist'
| 'timer'
| 'list'
| 'toolbar';

// the info associated with an accessibility action
Expand Down
1 change: 1 addition & 0 deletions React/Views/RCTViewManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ @implementation RCTConvert (UIAccessibilityTraits)
@"tablist" : @(UIAccessibilityTraitNone),
@"timer" : @(UIAccessibilityTraitNone),
@"toolbar" : @(UIAccessibilityTraitNone),
@"list" : @(UIAccessibilityTraitNone),
}),
UIAccessibilityTraitNone,
unsignedLongLongValue)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ public enum AccessibilityRole {
TAB,
TABLIST,
TIMER,
LIST,
TOOLBAR;

public static String getValue(AccessibilityRole role) {
Expand Down Expand Up @@ -135,6 +136,8 @@ public static String getValue(AccessibilityRole role) {
return "android.widget.SpinButton";
case SWITCH:
return "android.widget.Switch";
case LIST:
return "android.widget.AbsListView";
case NONE:
case LINK:
case SUMMARY:
Expand Down
1 change: 1 addition & 0 deletions packages/rn-tester/js/examples/FlatList/FlatListExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ class FlatListExample extends React.PureComponent<Props, State> {
getItemLayout={
this.state.fixedHeight ? this._getItemLayout : undefined
}
accessibilityRole="list"
horizontal={this.state.horizontal}
inverted={this.state.inverted}
key={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ function SectionListExample(Props: {...}): React.Element<typeof RNTesterPage> {
ItemSeparatorComponent={info => (
<CustomSeparatorComponent {...info} text="ITEM SEPARATOR" />
)}
accessibilityRole="list"
debug={debug}
inverted={inverted}
disableVirtualization={!virtualized}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ const SectionListExampleWithForwardedRef = React.forwardRef(
<SectionList
ref={ref}
testID="section_list"
accessibilityRole="list"
sections={DATA}
keyExtractor={(item, index) => item + index}
style={styles.list}
Expand Down