Accessibility-Test-Framework-for-Android
Accessibility-Test-Framework-for-Android copied to clipboard
SpeakableTextPresentCheck fails for TextInputEditText nested within TextInputLayout with app:expandedHintEnabled="false" set on InputLayout
I have a layout with several TextInputEditText's nested within a TextInputLayout. The hint is set on the inputlayout as well as the "labelFor" which references the TextInputEditText. We are setting app:expandedHintEnabled="false" on the TextInputLayout in order to show the floating hint for the EditText. TextReader does read the hint correctly, but our UI tests fail when running AccessibilityChecks.enable().setRunChecksFromRootView(true).
Posting the output of the failure here and it shows that the hint is present, so this seems like a false positive.
TextInputEditText{id=2131296643, res-name=creditCardNumEdit, visibility=VISIBLE, width=656, height=96, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=true, editor-info=[inputType=0x2 imeOptions=0x18000005 privateImeOptions=null actionLabel=null actionId=0 initialSelStart=0 initialSelEnd=0 initialCapsMode=0x0 hintText=Card number label=null packageName=null autofillId=null fieldId=0 fieldName=null extras=Bundle[{android.support.text.emoji.emojiCompat_metadataVersion=8, android.support.text.emoji.emojiCompat_replaceAll=false}] hintLocales=null contentMimeTypes=null ], x=0.0, y=0.0, text=, hint=Card number, input-type=2, ime-target=false, has-links=false}: This item may not have a label readable by screen readers. Reported by com.google.android.apps.common.testing.accessibility.framework.checks.SpeakableTextPresentCheck,