From 262db95f8f040222dae5d273da3373f13e8bdebc Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Sat, 27 Dec 2025 11:28:17 -0500 Subject: [PATCH] feat; Add "expanded" state and "level" attribute for AT-SPI --- platforms/atspi-common/src/node.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/platforms/atspi-common/src/node.rs b/platforms/atspi-common/src/node.rs index 33aa2279..77aaf88c 100644 --- a/platforms/atspi-common/src/node.rs +++ b/platforms/atspi-common/src/node.rs @@ -357,6 +357,15 @@ impl NodeWrapper<'_> { atspi_state.insert(State::Focused); } + if let Some(expanded) = state.data().is_expanded() { + atspi_state.insert(State::Expandable); + if expanded { + atspi_state.insert(State::Expanded); + } else { + atspi_state.insert(State::Collapsed); + } + } + atspi_state } @@ -399,6 +408,9 @@ impl NodeWrapper<'_> { if let Some(role_description) = self.braille_role_description() { attributes.insert("brailleroledescription", role_description.to_string()); } + if let Some(level) = self.0.level() { + attributes.insert("level", level.to_string()); + } attributes }