Accessibility-Test-Framework-for-Android icon indicating copy to clipboard operation
Accessibility-Test-Framework-for-Android copied to clipboard

False Positive for SpeakableTextPresentCheck in RecyclerView

Open cckroets opened this issue 3 years ago • 2 comments

In some tests we are seeing:

View my_recycler_view: This item may not have a label readable by screen readers. Reported by com.google.android.apps.common.testing.accessibility.framework.checks.SpeakableTextPresentCheck

Looking into the code the problem seems like this is happening because a RecyclerView doesn't have a content description, but my understanding is that we should not have to manually add a content description to a RecyclerView. Is this a bug in this library, or is there a recommendation for manually making RecyclerView accessible.

cckroets avatar Jan 06 '22 16:01 cckroets

I do have the same question. We enabled AccessibilityChecks.enable().setRunChecksFromRootView(true) for Espresso testing. One of frequent exceptions is this SpeakableTextPresentCheck. So far, we have suppressed the specific issue from RecyclerViews. I wonder why Espresso throws this exception and any significance for RecyclerView. Obviously, we can't make RecyclerView not-important-for-accessibility to avoid this exception for TalkBack users. It seems Android Test framework should handle it for us. Would love to hear any thoughts from the team.

hellohj avatar Nov 01 '22 16:11 hellohj

Filed an issue in our issue tracker here for anybody that wants updates on this.

calren avatar Nov 01 '22 17:11 calren