Skip to content

android: TalkBack state parts are joined with an English ", " whatever the app's language #704

Closed

Description

@houko

Context

On Android, the state TalkBack reads after a node's role (partially checked, expanded or collapsed, the value text) is joined with a hard-coded English separator. appendState in internal/platform/android/java/dev/oneo/nsgo/NsgoView.java:4754-4758:

if (state.length() > 0) state.append(", ");

The parts themselves are localized (spoken(Protocol.SPOKEN_*), sent by Go in the app's language), but the separator is not, so a Chinese or Japanese app gets 已展开, 50% rather than 已展开,50%.

Why it matters

Minor: TalkBack only pauses at the comma, so the reading is understandable. It is still an English punctuation mark in a description that is otherwise in the app's language, and it shows up in accessibility dumps and tests that compare the description text.

Proposal

Send the list separator with the other spoken words (a SPOKEN_SEPARATOR entry, , for zh, 、 or , for ja per the locale's convention, , otherwise) and use it in appendState.

Acceptance

  • With the app language set to Chinese, an expandable node with a value is described with , between the parts.
  • English output is unchanged.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions