I'm going through our iOS app to fix accessibility issues. One of the features of the app is a UITextField in which the user can enter search queries. I've set the trait of the field to be "search field", and VoiceOver does a good job with the field most of the time. When there's text in the field, it reads the text, then says "search field".
The problem I want to solve is how VoiceOver handles the placeholder text. When the text field is empty, we've set the placeholder text to show a sample query. Since it appears as greyed-out text, sighted users can see that it's just the placeholder text. But VoiceOver doesn't make that distinction for visually impaired users. It just reads the placeholder text the same way as regular text, with no extra description.
Is there a way to add an accessibility trait to a UITextField's placeholder text? Or have people worked around this through other means?