Open nebeker opened 4 years ago
Perhaps https://developer.android.com/reference/android/view/View.html#setContentDescription(java.lang.CharSequence) would do it, I'm not sure myself though. The other accessibility APIs look quite messy in Android
Right, that's what I've been using for other icons and buttons, but I was struggling to apply it to the spannable.
I'm going to look into applying it to the final ((TextView) holder.gild).append(platinized); possibly by building a
contentDescription` string piece by piece with title+silver+gold+platinum in the same way to icons are appended.
The catch is whether or not a TextView will really like a contentDescriptiom - it seems to at least accept the set method.
Silver, Gold and Platinum award icons are shown in submission titles and in comments as bitmaps within spannables, but aren't labeled for TalkBack to read them.
In effect, "A good post [silver] x2 [platinum]" is read out by the screen reader as "A good post x2."
The relevant code is in multiple files and starts around
new SpannableStringBuilder("\u00A0★" + timesGilded + "\u00A0");
It's easy enough to replace the ★ with a readable string, but we don't want to see the string, just hear it.
Any suggestions?
Slide version: 6.2.2 Android version: 9