diff --git a/Libraries/Components/View/ViewAccessibility.js b/Libraries/Components/View/ViewAccessibility.js index ccdc6a6688a083..47c99e27a9ae85 100644 --- a/Libraries/Components/View/ViewAccessibility.js +++ b/Libraries/Components/View/ViewAccessibility.js @@ -41,6 +41,7 @@ export type AccessibilityRole = | 'tab' | 'tablist' | 'timer' + | 'list' | 'toolbar'; // the info associated with an accessibility action diff --git a/Libraries/DeprecatedPropTypes/DeprecatedViewAccessibility.js b/Libraries/DeprecatedPropTypes/DeprecatedViewAccessibility.js index ef82aa5c7dedfe..2ba6f3115c98f3 100644 --- a/Libraries/DeprecatedPropTypes/DeprecatedViewAccessibility.js +++ b/Libraries/DeprecatedPropTypes/DeprecatedViewAccessibility.js @@ -40,6 +40,7 @@ module.exports = { 'tab', 'tablist', 'timer', + 'list', 'toolbar', ], }; diff --git a/React/Views/RCTViewManager.m b/React/Views/RCTViewManager.m index a2d5dd683e0ed4..799e60a0793747 100644 --- a/React/Views/RCTViewManager.m +++ b/React/Views/RCTViewManager.m @@ -61,6 +61,7 @@ @implementation RCTConvert (UIAccessibilityTraits) @"tablist" : @(UIAccessibilityTraitNone), @"timer" : @(UIAccessibilityTraitNone), @"toolbar" : @(UIAccessibilityTraitNone), + @"list" : @(UIAccessibilityTraitNone), }), UIAccessibilityTraitNone, unsignedLongLongValue) diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactAccessibilityDelegate.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactAccessibilityDelegate.java index 78c83a38611ab3..7085883a73081c 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactAccessibilityDelegate.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactAccessibilityDelegate.java @@ -107,6 +107,7 @@ public enum AccessibilityRole { TAB, TABLIST, TIMER, + LIST, TOOLBAR; public static String getValue(AccessibilityRole role) { @@ -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: diff --git a/packages/rn-tester/js/examples/FlatList/FlatListExample.js b/packages/rn-tester/js/examples/FlatList/FlatListExample.js index abe670b608aeb0..d58c61cec4ce8e 100644 --- a/packages/rn-tester/js/examples/FlatList/FlatListExample.js +++ b/packages/rn-tester/js/examples/FlatList/FlatListExample.js @@ -196,6 +196,7 @@ class FlatListExample extends React.PureComponent { getItemLayout={ this.state.fixedHeight ? this._getItemLayout : undefined } + accessibilityRole="list" horizontal={this.state.horizontal} inverted={this.state.inverted} key={ diff --git a/packages/rn-tester/js/examples/SectionList/SectionList-scrollable.js b/packages/rn-tester/js/examples/SectionList/SectionList-scrollable.js index 78c28ae4f027e1..9a3da679c94aab 100644 --- a/packages/rn-tester/js/examples/SectionList/SectionList-scrollable.js +++ b/packages/rn-tester/js/examples/SectionList/SectionList-scrollable.js @@ -275,6 +275,7 @@ export function SectionList_scrollable(Props: { ItemSeparatorComponent={info => ( )} + accessibilityRole="list" debug={debug} inverted={inverted} disableVirtualization={!virtualized} diff --git a/packages/rn-tester/js/examples/SectionList/SectionListBaseExample.js b/packages/rn-tester/js/examples/SectionList/SectionListBaseExample.js index 9989483b1d9f70..ce93c31c5bb47d 100644 --- a/packages/rn-tester/js/examples/SectionList/SectionListBaseExample.js +++ b/packages/rn-tester/js/examples/SectionList/SectionListBaseExample.js @@ -95,6 +95,7 @@ const SectionListBaseExample: React.AbstractComponent< item + index} style={styles.list}