Skip to content

Commit

Permalink
ScreenReader does not announce column index
Browse files Browse the repository at this point in the history
  • Loading branch information
fabOnReact committed Feb 13, 2022
1 parent 8750769 commit bd3956e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Libraries/Lists/FlatList.js
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ class FlatList<ItemT> extends React.PureComponent<Props<ItemT>, void> {
keyExtractor={this._keyExtractor}
accessibilityCollectionInfo={this._getAccessibilityCollectionInfo()}
accessibilityRole={Platform.select({
android: this.props.numColumns > 1 ? 'grid' : 'list',
android: this.props.numColumns > 1 ? 'grid' : 'grid',
})}
ref={this._captureRef}
viewabilityConfigCallbackPairs={this._virtualizedListPairs}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,10 @@ public void onInitializeAccessibilityNodeInfo(
final ReadableMap accessibilityCollectionInfo = (ReadableMap) host.getTag(R.id.accessibility_collection_info);

if (accessibilityCollectionInfo != null) {
int rowCount = accessibilityCollectionInfo.getInt("rowCount");
int columnCount = accessibilityCollectionInfo.getInt("columnCount");
int rowCount = 10; // accessibilityCollectionInfo.getInt("rowCount");
int columnCount = 3; // accessibilityCollectionInfo.getInt("columnCount");
// int rowCount = accessibilityCollectionInfo.getInt("rowCount");
// int columnCount = accessibilityCollectionInfo.getInt("columnCount");
boolean hierarchical = accessibilityCollectionInfo.getBoolean("hierarchical");

AccessibilityNodeInfoCompat.CollectionInfoCompat collectionInfoCompat = AccessibilityNodeInfoCompat.CollectionInfoCompat.obtain(rowCount, columnCount, hierarchical);
Expand Down

0 comments on commit bd3956e

Please sign in to comment.