문제

What's the preferred way to handle long numbers, like a bank account number, that should be read one character at a time? I know users can get TalkBack to read out a number this way, but it would be nice if we could hint that it should do this from the start.

Is it a good idea to set a content description with spaces between the numbers, or will users find this annoying?

Thanks!

도움이 되었습니까?

해결책

I have talked to several screen-reader users and they have all confirmed that we shouldn't go out of our way to do anything out of the ordinary in cases like this. They all say "Don't worry, we can figure it out. You don't need to help us."

If a screen reader user gets to an area that they need more clarity on they will use their arrow keys to go character by character until they are satisfied and continue on letting the screen-reader continue.

다른 팁

Use the following delegate for your editText or textView

@Override
public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfo info) {
    super.onInitializeAccessibilityNodeInfo(host, info);
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {

        switch (host.getId()) {
            case R.id.tv_bookingID:
                if (((TextView) host).getText().length() > 1) {
                    sb.delete(0, sb.length());
                    for (char c : ((TextView) host).getText().toString().toCharArray()) {
                        sb.append(c).append(" ");
                    }
                    //change text for talkback
                    info.setText(null);
                    info.setContentDescription(sb.toString().trim());

                }
                break;
        }
    }//if
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top