In general, HTML text fields get their accessibility label from <label>
tags. For example:
<label for=myField>My Field</label> <input id=myField>
In VoiceOver, this reads as a static text block "My Field", and a text field "My Field, Text Field, Double tap to edit." Both in VoiceOver and regular phone use, tapping the <label>
will cause the text field to focus.
If you call [tester tapViewWithAccessibilityLabel:@"My Field"]
, KIF will send a tap event to the label, causing UIWebView
to focus the text field. You can then use [tester enterTextIntoFirstResponder:@"..."]
to enter your text.