question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[IOS]Accessibility issue: Voice over read out order for flatlist is incorrect

See original GitHub issue

Description: Voice over read out for Items which are rendered using flatlist is not in right order. issue can be reproduced only in IOS and in android it works fine. I have multiple interactive elements within column. imagine columns containing favorite icon, image, multiline text and add button. Expected behavior: it should first read out favorite icon, image, multiline text and add button from column 1 and then the same from 2nd column. Actual behavior: currently it is reading following order favorite icon (column 1 ) --> favorite icon (column 2) --> image (column 1 ) --> image(column 2)—> multiline text (column 1 ) --> multiline text(column 2) --> add button(column 1) --> add button(column 2)

I tried this for simple demo and issue is easily reproducible.

Please provide a clear and concise description of what the bug is. Include screenshots if needed.
Please test using the latest React Native release to make sure your issue has not already been fixed: https://reactnative.dev/docs/upgrading.html
React Native version:
Run `react-native info` in your terminal and copy the results here.
   System:
    OS: macOS Mojave 10.14.6
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
    Memory: 7.10 GB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 10.13.0 - /usr/local/bin/node
    npm: 6.4.1 - /usr/local/bin/npm
  SDKs:
    iOS SDK:
      Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
  IDEs:
    Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.9.0 => 16.9.0 
    react-native: 0.61.5 => 0.61.5 
  npmGlobalPackages:
    create-react-native-app: 2.0.2
    react-native-cli: 2.0.1 

## Steps To Reproduce

    Provide a detailed list of steps that reproduce the issue.
    Issues without reproduction steps or code are likely to stall.


     ```
     import React from 'react';
import {
  StyleSheet,
  View,
  Text,
    Image,
    TouchableOpacity,
    SafeAreaView,
    FlatList,
    Dimensions,
} from 'react-native';

    const data = [
        { key: 'Apple', price:'$1.91 each' },
        { key: 'Organic Bananas, bunch', price:'$2.91/LB' },
        { key: 'Banana Babies', price:'$2.91 avg price' },
        { key: 'meat',price:'$20.91' },
        { key: 'Eggs' , price:'$12.91 avg price'},
        { key: 'Fish' , price:'$7.91 avg price'},
        { key: 'Green Apples', price:'$9.91 avg price' },
        { key: 'fresh fruits', price:'$6.91 avg price'},
        { key: 'Ice cream', price:'$2.91 avg price' }
    ];

    const numColumns=2;
class App extends React.Component{
    renderItem=({item,index})=>{
        return(
            <View style={styles.item}>
                <TouchableOpacity
                    style={styles.button}
                    onPress={this.onPress}
                     accessible={false}
                >
                    <Text style={styles.itemText1}>Rollback</Text>
                </TouchableOpacity>
                <View accessible={true}
                      accessibilityLabel="This is Demo Image">
                    <Image
                        style={{width: 75, height: 75}}
                        source={{uri: 'https://reactnative.dev/img/tiny_logo.png'}}/>
                </View>

                <Text  style={styles.itemText}>{item.key}</Text>
                <TouchableOpacity>
                    <Text style = {styles.button}>
                        ADD
                    </Text>
                </TouchableOpacity>
                <Text style={styles.itemText}>{item.price}</Text>
            </View>
        )
    };
    render(){
        return(
            <SafeAreaView style={styles.container1}>
            <FlatList
                data={data}
                style={styles.container}
                renderItem={this.renderItem}
                numColumns={numColumns}
            />
            </SafeAreaView>
        );
    }
}

const styles = StyleSheet.create({
  container: {
      flex:1,
      marginVertical:20,
  },
    container1: {
        flex: 1,
    },
  item: {
      backgroundColor:"grey",
      alignItems:'center',
      justifyContent:'center',
      flex:1,
      margin:1,
      height:Dimensions.get('window').width/numColumns,
  },
  itemText: {
    color:'#fff',
      paddingTop:5,
  },
    itemText1: {
       flexDirection:'row',
        color:'red',
        paddingBottom:4,
        justifyContent:'flex-end'
    },
    imageThumbnail: {
        justifyContent: 'center',
        alignItems: 'center',
        height: 100,
    },
    button: {
        backgroundColor: '#DDDDDD',
        margin:4
    },
});

export default App;

IMG_1259

Expected Results

Describe what you expected to happen.
it should first read out favorite icon, image, multiline text and add button from  column 1 and 
then the same from 2nd column. 

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

4reactions
felirecommented, Sep 3, 2020

Same issue here

1reaction
RichardStolpcommented, Jul 30, 2020

Hi, A project for a company I currently work with is having the same issue as well. Is there an update for this issue? Thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Voice over focus for horizontal flatlist items on a vertical flatlist
Talk back traversing of horizontal flatlist in vertical flatlist is working fine as expected in Android . Issue is only in iOS ....
Read more >
Accessibility For Ios, Voiceover Read Order Issue - ADocLib
Next Accessibility issue: Voice over read out order for flatlist is incorrect using flatlist is not in right order. issue can be reproduced...
Read more >
Accessibility - React Native
To enable VoiceOver, go to the Settings app on your iOS device (it's not available for simulator). Tap General, then Accessibility. There you ......
Read more >
"Fixing" React Navigation & iOS screen reader focus
A workaround for flaky iOS screen reader focus in combination with React Navigation. Tagged with reactnative, reactnavigation, a11y.
Read more >
[Solved]-iOS Accessibility Voiceover Reads Out Unnecessary ...
Coding example for the question iOS Accessibility Voiceover Reads Out Unnecessary Content in Web. ... The way that is being read out is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found