@@ -75,20 +75,23 @@ public object ViewStateRenderers {
7575 // Technically there can be multiple semantic modifiers on a single node, so read them
7676 // all.
7777 .flatten()
78+ .sortedBy { it.key.name }
7879 .forEach { (key, value) ->
7980 when (key) {
8081 SemanticsProperties .TestTag -> appendLabeledValue(" test-tag" , value)
8182 SemanticsProperties .ContentDescription -> appendLabeledValue(
8283 " content-description" ,
8384 (value as List <* >).map { " \" $it \" " }
8485 )
86+
8587 SemanticsProperties .StateDescription -> appendLabeledValue(" state-description" , value)
8688 SemanticsProperties .Disabled -> append(" DISABLED" )
8789 SemanticsProperties .Focused -> if (value == true ) append(" FOCUSED" )
8890 SemanticsProperties .IsDialog -> append(" DIALOG" )
8991 SemanticsProperties .IsPopup -> append(" POPUP" )
9092 SemanticsProperties .ProgressBarRangeInfo ->
9193 appendLabeledValue(" progress-bar-range" , value)
94+
9295 SemanticsProperties .PaneTitle -> appendLabeledValue(" pane-title" , value)
9396 SemanticsProperties .SelectableGroup -> append(" SELECTABLE-GROUP" )
9497 SemanticsProperties .Heading -> append(" HEADING" )
@@ -98,11 +101,13 @@ public object ViewStateRenderers {
98101 " horizontal-scroll-axis-range" ,
99102 scrollAxisRangeToString(value as ? ScrollAxisRange )
100103 )
104+
101105 SemanticsProperties .VerticalScrollAxisRange ->
102106 appendLabeledValue(
103107 " vertical-scroll-axis-range" ,
104108 scrollAxisRangeToString(value as ? ScrollAxisRange )
105109 )
110+
106111 SemanticsProperties .Role -> appendLabeledValue(" role" , value)
107112 SemanticsProperties .TextSelectionRange -> append(" SELECTED-TEXT" )
108113 SemanticsProperties .ImeAction -> appendLabeledValue(" ime-action" , value)
@@ -244,7 +249,8 @@ public object ViewStateRenderers {
244249 */
245250 // This function is only visible to Java consumers of this library.
246251 @JvmStatic
247- @PublishedApi internal fun <T : Any > androidViewStateRendererFor (
252+ @PublishedApi
253+ internal fun <T : Any > androidViewStateRendererFor (
248254 renderedClass : Class <T >,
249255 renderer : AttributeAppendable .(T ) -> Unit
250256 ): ViewStateRenderer = ViewStateRenderer { scannableView ->
0 commit comments