From 355b25b10a36088988fc7c0a0f75974f51f025f0 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Sat, 7 Sep 2019 12:50:01 -0500 Subject: [PATCH] Add support for speaking collapsed/expanded status of `EditorInspectorSection`. --- addons/accessibility/accessible.gd | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/addons/accessibility/accessible.gd b/addons/accessibility/accessible.gd index 0a80177..a43c5c4 100644 --- a/addons/accessibility/accessible.gd +++ b/addons/accessibility/accessible.gd @@ -361,12 +361,23 @@ func is_focusable(node): return true func editor_inspector_section_focus(): - print(node.get_child_count()) - tts.speak("editor inspector section", true) + var child = node.get_children()[0] + var expanded = child.is_visible_in_tree() + tts.speak("editor inspector section:", true) + if expanded: + tts.speak("expanded", false) + else: + tts.speak("collapsed", false) func editor_inspector_section_input(event): if event.is_action_pressed("ui_accept"): left_click() + var child = node.get_children()[0] + var expanded = child.is_visible_in_tree() + if expanded: + tts.speak("expanded", true) + else: + tts.speak("collapsed", true) func _init(tts, node): if node.is_in_group("accessible"):