[Tablayout] Accessibility issues
See original GitHub issueDescription: I am using a Material Tablayout connected with a viewpager2 for an onboarding experience. My Tablayout setup looks like this:
<com.google.android.material.tabs.TabLayout
android:id="@+id/onboardingSelector"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/onboardingPages"
app:tabBackground="@drawable/tab_selector"
app:tabGravity="center"
app:tabIndicatorHeight="0dp" />
While running this screen through Accessibility Scanner and Google play console Pre launch reports, I am getting below warnings for the dot
tabBackground
This item may not have a label readable by screen readers.
This item’s width is 24dp. Consider making the width of this touch target 48dp or larger.
How can I fix these ? Should the material ui library come with the support for this setup?
Android API version: Android 9
Material Library version: 1.3.0-alpha02
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
android - Material TabLayout Access Issue - Stack Overflow
I am using support design version 28.0.0 in my app and trying to use material tablayout in XML. com.google.android.material.tabs.TabLayout.
Read more >Accessible Tabbed Navigation in Android - Deque Systems
By default, TabWidgets are not accessible in Android. To make them accessible, they need customization that adds their name, role, value, and ...
Read more >Accessibility at STRV: Android Best Practices
The Android Toolbar is not accessible while using a keyboard for navigation. This is a huge issue and may cause you headaches if...
Read more >Apply visual attributes to tab layout - Android Tutorial - LinkedIn
Let's run it and see how it works. - [Talk Back] Apps, home, accessibility examples. - [Instructor] Go to the tab layout. -...
Read more >Android develop - Vocal navigation
Vocal navigation, accessibility dev recommandations with Android. ... below a ViewPager in one case in TabLayout and in the other in BottomNavigationView ....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ahetawal-p you can try the following to fix the Accessibility text
I am not sure about the tab dot size though
I’ll close the issue as WAI.
The content description of tabs is supposed to be set by clients via providing with
TabItem
orTab
, or as what @mbaraka suggested, providing a customTabConfigurationStrategy
to set up a default content desc.