-
When VoiceOver is enabled, it sometimes reads auto-generated image descriptions such as 'a blue and white logo on a white background' or 'warning icon, image error' instead of the custom accessibilityLabel we've set on the icons. How can we prevent VoiceOver from reading these image-specific descriptions and ensure it only reads our custom labels?
-
Just like UIAccessibility.isVoiceOverRunning lets us check if VoiceOver is active, is there an equivalent API to detect whether Voice Control is currently enabled?
Accessibility Questions
For your first question, make sure that you are setting isAccessibilityElement to true and applying the accessibilityLabel string to that same element. You can also toy with the traits, you can try adding or removing the .image trait to the element which may alter how VoiceOver interacts with it.
Additionally, for small or decorative icons like a warning symbol next to a warning string, the symbol is necessary to have individually focusable by VoiceOver. These can be safely ignored by or hidden from accessibility.
Larger images with intentional communication, text, specific imagery, etc should be using accessibilityLabel APIs like you are already doing, but yeah let's try and figure out why VoiceOver isn't speaking your label at all!
For your second question, no there is not an equivalent API for Voice Control.