sbycrosz / react-native-credit-card-input

Easy, cross-platform credit-card input for your React Native Project! Start accepting payment 💰 in your app today!
MIT License
1.47k stars 706 forks source link

Accessibility not passing up to each CCInput #79

Closed jasoneo016 closed 4 months ago

jasoneo016 commented 7 years ago

I am trying to automate some tests on Appium and I am able to create accessibilityLabel, accessibilityTraits, and accessible up to other Components, but when I try to do it using your open source library, it doesn't work. Have you guys experienced this issue before and how would you go about resolving it?

Thanks.

fr1n63 commented 6 years ago

I think no additionalInputProps are going in to the CCInput TextField - I've been trying to pass up editable=false with no joy. It makes it to the CCInput fine, but not on to the TextInput.

Looking at the src of CCInput I can't see any obvious reason why that wouldn't be passed.

const inputDisabledProp = {editable: false};

<CreditCardInput
  additionalInputsProps={{
    number: inputDisabledProp,
    expiry: inputDisabledProp,
    cvc: inputDisabledProp
  }}
/>
triage commented 6 years ago

any update on this one? I'm also stuck with UI tests. The fields aren't visible in XCUIApplication().textFields. They are found in po XCUIApplication().otherElements but I can't type into them.

triage commented 6 years ago
// <TouchableOpacity onPress={this.focus}> <-- this line is causing the problem
  <View style={[containerStyle]}>
    { !!label && <Text style={[labelStyle]}>{label}</Text>}
    <TextInput ref="input"

https://github.com/sbycrosz/react-native-credit-card-input/pull/109