| Id | InsufficientGranularityinCustomViews |
| Summary | Child items in custom views are not independently focusable or readable |
| Severity | N/A |
| Category | Assistive Technologies / Custom Views and Implementation |
| Affects | Kotlin and Java files |
| Implementation | Manual testing – automatic detection is not practical due to the highly context-dependent nature of granular accessibility in custom views. Review with real devices and screen readers is essential to verify child element exposure and navigation. |
Complex custom views (graphs, charts, interactive components) are treated
as single focusable elements instead of exposing individual child elements
or data points through proper accessibility tree structure, missing
contentDescription for individual segments or lacking
accessibility actions for navigation (e.g., not implementing
AccessibilityNodeProvider
to expose child nodes).
Prevents assistive technology users from accessing detailed information within complex UI components, forcing them to receive only high-level announcements instead of being able to explore and understand specific data points, trends, or interactive elements that sighted users can access visually.
class ChartView(context: Context) : View(context) {
override fun onDraw(canvas: Canvas?) {
// Draw multiple data points, but expose only one accessibility node
}
init {
contentDescription = "Sales chart"
}
// Missing AccessibilityNodeProvider implementation to expose each data point
}