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

[iOS] VoiceOver reads the placeholder in TextInput #44230

Open
prateek0227 opened this issue Apr 24, 2024 · 3 comments
Open

[iOS] VoiceOver reads the placeholder in TextInput #44230

prateek0227 opened this issue Apr 24, 2024 · 3 comments
Labels
Component: TextInput Related to the TextInput component. Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project. Needs: Attention Issues where the author has responded to feedback. Needs: Version Info Platform: iOS iOS applications.

Comments

@prateek0227
Copy link

prateek0227 commented Apr 24, 2024

Description

When setting a placeholder in the TextInput field, VoiceOver reads the placeholder text. This causes problems when an accessibilityLabel is also provided.

Expected behaviour: Placeholder should not be read by a screen reader as it is just a visual component.

Steps to reproduce

Try this sample code:

import React from 'react';
import {SafeAreaView, StyleSheet, TextInput} from 'react-native';

const TextInputExample = () => {
  const [text, onChangeText] = React.useState('');

  return (
    <SafeAreaView>
      <TextInput
      placeholder="text input"
      accessibilityLabel="text input"
        style={styles.input}
        onChangeText={onChangeText}
        value={text}
      />
    </SafeAreaView>
  );
};

const styles = StyleSheet.create({
  input: {
    height: 40,
    margin: 12,
    borderWidth: 1,
    padding: 10,
  },
});

export default TextInputExample;

React Native Version

0.74.0

Affected Platforms

Runtime - iOS

Output of npx react-native info

n/a

Stacktrace or Logs

n/a

Reproducer

https://snack.expo.dev/eiduCgHeg-d8A6PLexqp2

Screenshots and Videos

IMG_F51B7AE11582-1

Copy link

⚠️ Add or Reformat Version Info
ℹ️ We could not find or parse the version number of React Native in your issue report. Please use the template, and report your version including major, minor, and patch numbers - e.g. 0.70.2

@github-actions github-actions bot added Needs: Author Feedback Component: TextInput Related to the TextInput component. Platform: iOS iOS applications. and removed Needs: Triage 🔍 labels Apr 24, 2024
@cortinico cortinico added the Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project. label Apr 24, 2024
@elencho
Copy link

elencho commented Apr 25, 2024

Can i work on this issue?

@prateek0227
Copy link
Author

Yes, please 🙂

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: TextInput Related to the TextInput component. Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project. Needs: Attention Issues where the author has responded to feedback. Needs: Version Info Platform: iOS iOS applications.
Projects
None yet
Development

No branches or pull requests

3 participants