Skip to content

Commit 436b34a

Browse files
committed
Remove Panel accessible role from the root node, and unknown nodes (fixes issues on Windows)
This fixes issues on Windows: 1. Windows pronounced "Panel unavailable" at start 2. When we focus on Switch or Box(Modifier.clickable), there was "Panel0" pronounced. Now it says nothing. 3. After merging #881 refocus the main component. This leads to pronouncing the window title, now it says nothing, as the accessible root node is unknown on macOs it doesn't change anything ## Testing Manually with accessibility enabled on run1 (Windows, macOs)
1 parent 54577e1 commit 436b34a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/ComposeAccessible.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ internal class ComposeAccessible(
402402
setText != null -> AccessibleRole.TEXT
403403
text != null -> AccessibleRole.LABEL
404404
progressBarRangeInfo != null -> AccessibleRole.PROGRESS_BAR
405-
else -> AccessibleRole.PANEL
405+
else -> AccessibleRole.UNKNOWN
406406
}
407407
}
408408

compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/ComposeSceneAccessible.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ internal class ComposeSceneAccessible(
153153
}
154154

155155
override fun getAccessibleRole(): AccessibleRole {
156-
return AccessibleRole.PANEL
156+
return AccessibleRole.UNKNOWN
157157
}
158158

159159
override fun getAccessibleStateSet(): AccessibleStateSet {

0 commit comments

Comments
 (0)