Prevent Confusing Acronym Announcements in Android
This post was co-authored by Chris McMeeking and Alistair Barrell.
When doing accessibility testing, how often do you listen to the entire duration of a long announcement? For example, if you were to focus this paragraph with TalkBack, what would you listen to? The entire thing? Or would you listen to the first few bits, and then read the rest of the text, assuming the Android APIs are handling it properly?
But wait a minute, what about that little bit there: “API?” How does that get pronounced? What if I spelled it “api” instead of “API?” Is there a difference?
Also remember, the Android operating system exists in countless different versions on thousands of different devices around the world. Each of these devices has a potentially different combination of TalkBack version, Accessibility API version, manufacturer OS modifications, etc. So, just because it happens to work for your setup, that doesn’t mean it works for everyone!
For instance, some versions of Voiceover interpret this sentence:
Flight DQ 132 is on time to depart to Los Angeles, CA in 45m
as
Flight DQ 132 is on time to depart to Los Angeles Certificate Authority in 45 meters
This announcement is obviously incorrect! The person hearing this would be very confused as to why their flight is going to the LA certificate authority, and why their flight is departing 45 meters from their current location.
Use Content Descriptions
Luckily for us there is an easy fix. Simply adding a content description for the text with the acronyms replaced by their actual pronunciations. For the example above, the content description would be
Flight D Q 132 is on time to depart to Los Angeles California in forty-five minutes
Notice that D Q is split such that the letters get announced separately, and we have spelled out California and minutes. By changing the content description but not the visible text of the text view, we don’t have to change our user interface, but at the same time we present the information to TalkBack users in a way that isn’t confusing.
Best Practice
Any time you use shorthand letters for acronyms or common letter word substitutions (m = minutes), double-check that TalkBack is announcing it correctly. There are two acceptable pronunciations. One is that the text gets read out verbatim, the other is that the text gets read out in its accurate expanded form. For example, “45m 15s” can read out as “45 m 15 s” or “45 minutes 15 seconds.” However, “45 meters fifteens” is not acceptable.
Be sure to listen to all TalkBack announcements, and check that they are announced in a way that makes sense! Just because an item is focusable and announced in TalkBack does not mean it is completely accessible, and just because it works on your set up, doesn’t mean it works for everyone!
Learn more…
- Read more Deque University Best Practice posts.
- Sign up for a mobile accessibility webinar.
- Discover how Deque products can help you make sure your apps and websites fully accessible.
Hmn, Android says not to use these in some cases: “An android:contentDescription should not be used as a content label for editable Views.” https://support.google.com/accessibility/android/answer/7158690?hl=en
So when you have a field and the hint or text is YYYY, what do you do to ensure the user doesn’t year “yayayay”?