Add the accessible-expanded property

This commit is contained in:
Arnold Loubriat 2024-12-22 16:37:56 +01:00 committed by Simon Hausmann
parent 53fd7b12e4
commit f30f953ffd
13 changed files with 66 additions and 1 deletions

View file

@ -382,6 +382,18 @@ public:
return std::nullopt;
}
/// Returns the accessible-expanded of that element, if any.
std::optional<bool> accessible_expanded() const
{
if (auto result = get_accessible_string_property(
cbindgen_private::AccessibleStringProperty::Expanded)) {
if (*result == "true")
return true;
else if (*result == "false")
return false;
}
return std::nullopt;
}
/// Returns the accessible-expandable of that element, if any.
std::optional<bool> accessible_expandable() const
{