Add the accessible-expandable property

This commit is contained in:
Arnold Loubriat 2024-12-22 16:15:37 +01:00 committed by Simon Hausmann
parent e442965889
commit 53fd7b12e4
12 changed files with 42 additions and 0 deletions

View file

@ -382,6 +382,19 @@ public:
return std::nullopt;
}
/// Returns the accessible-expandable of that element, if any.
std::optional<bool> accessible_expandable() const
{
if (auto result = get_accessible_string_property(
cbindgen_private::AccessibleStringProperty::Expandable)) {
if (*result == "true")
return true;
else if (*result == "false")
return false;
}
return std::nullopt;
}
/// Sets the accessible-value of that element.
///
/// Setting the value will invoke the `accessible-action-set-value` callback.