Should UIAlertController title be announced as header by voiceover

Voiceover of UIAlertController by default announces title's accessibilityTrait as static text.

I'm trying to change the accessibilityTrait to be of type header and can't seem to have a direct way to access title label and modify the attribute. Only solution seems to be to add custom label to be able to modify accessibilityTrait. Now, this got me wondering should the default behavior of UIAlertController be left untouched?

Have anyone else tried to do this? And, is there any other way to customize accessibilityTrait of UIAlertController title label that I'm missing out on?

Thanks in advance.

Replies

For system alerts, the behavior is that the title does not have any special traits like heading, as you noticed. My recommendation would be to follow this pattern in your own app so that the experience is consistent for VoiceOver users across all apps.

Thank you for the quick response.

If we decide to change the title trait to be heading to maintain consistency across app, can it be achieved only by adding custom label and modify it as required? Or, is there any way to modify the default UIAlertController title label trait?