Accessibility-Test-Framework-for-Android
Accessibility-Test-Framework-for-Android copied to clipboard
False Positive for SpeakableTextPresentCheck in RecyclerView
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.
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.
Filed an issue in our issue tracker here for anybody that wants updates on this.