Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 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.ListView";
Copy link
Contributor

Choose a reason for hiding this comment

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

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 @@ -272,6 +272,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