Android Accessibility In Edit Text Box Text Not Reading Properly/expect After Talk Back On
Solution 1:
In general, you don't want to force a screen reader to read something a specific way. Unfortunately, screen reader users are used to the way things are read. If your input field has a properly associated label with it, such as "zipcode", then when they hear "zipcode Fourty Five Thousand and Nine hundred eighty seven", they will understand what it is. Screen reader users can navigate elements by character so they can read each number separately if they want.
The important part is that you have a label associated with the input field. I know you're writing specifically for Android (which I'm not familiar with), but if I compare what you're doing to html, in html you'd want something like:
<labelfor="zip">zipcode:</label><inputid="zip">
There are ways (in html) to force what a screen reader says, but it typically messes things up for braille users. Any "hidden" text you add to force the screen reader speech is physically displayed on braille devices.
For html, the autocomplete
attribute can be used as a "hint" to screen readers on the type of information that is in a field. Screen reading software can use that hint to change the way it reads the contents of the field (such as autocomplete="postal-code"
), but support for this hint is not widely supported yet. Again, I know that's for html and you're writing specifically for android, but perhaps there's a similar "hint" concept for android.
Solution 2:
It is best to not force Talk Back to do this. My recommendation would actually be to just stop doing this altogether. As a blind person it is actually easier to parse a single number than individual ones. 45,500 is easier to remember than 4, 5, 5, 0, 0. Covering "forty-five thousand nine-hundred eighty-seven" mentally to a zip code becomes second nature. And if there's a number long enough such that it requires inspection one number at a time, TalkBack has modes to support that. You can switch TalkBack to character mode and explore it like that manually.
This requirement really just comes from sighted individuals thinking like a sighted individuals and solving problems blind individuals don't have.
And since another user brought it up, the best way to code an edit text in Android is
TextViewlabel= ....
EditTexteditBox= .....
label.setLabeFor(editBox);
Post a Comment for "Android Accessibility In Edit Text Box Text Not Reading Properly/expect After Talk Back On"