• Mark Schillaci's avatar
    Update Android to concat a11y state descriptions · c4e162c3
    Mark Schillaci authored
    This CL updates our approach to the state description
    member variable of AccessibilityNodeInfo objects on Android.
    Until now we have picked a single state description based
    on the node. With this change we now concatenate all
    potential state descriptions to make sure no information is
    lost on mixed nodes (e.g. multiselectable listBox).
    
    We added a few exceptions to concatenation, namely the case
    of a multiselectable listbox will not announce the number of
    items in the list when some are selected. This is to prevent
    an utterance like:
    
    "multiselectable, 2 of 4 selected. 4 items"
    
    Instead in the case of a multiselectable listbox, it will be
    read as either:
    
    "multiselectable, none selected. 4 items"
    or
    "multiselectable, 2 of 4 selected."
    
    Similarly, we make toggle buttons and partially checked
    checkboxes mutually exclusive to prevent double speak.
    
    As of now all other cases are simply concatenated.
    
    
    AX-Relnotes: N/A
    Change-Id: I5650230b141cae24dfd935be596fb14720b723ec
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2476520Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
    Reviewed-by: default avatarMark Schillaci <mschillaci@google.com>
    Commit-Queue: Mark Schillaci <mschillaci@google.com>
    Cr-Commit-Position: refs/heads/master@{#818000}
    c4e162c3
browser_accessibility_android.cc 66.5 KB