jobandtalent / AnimatedTextInput

Animated UITextField and UITextView replacement for iOS
MIT License
760 stars 128 forks source link

Expose placeholder text in UI-Tests / Voice Over #98

Closed tschob closed 6 years ago

tschob commented 6 years ago

Our Need

For our UI-Tests it is necessary to have an accessible placeholder since we want to verify that the warning and error messages are shown.

Right now we saw no possible way to access this information

What did we do?

We set the accessibilityLabels of textInput to expose the placeholder text in UI-Tests (and Voice Over) every time the placeholder text is changed.

What do you think: Can this be merged into the library?

Example

Before: Text field ("some text typed"). The placeholder is not accessible

notaccessible_placeholder_withtext

After: Same text field, but the placeholder is accessible through the label

normal_placeholder_withtext