Add the accessible-enabled property

This commit is contained in:
DataTriny 2024-10-20 14:49:59 +02:00 committed by Simon Hausmann
parent 129936a7d7
commit 2de3b9d455
51 changed files with 80 additions and 1 deletions

View file

@ -231,6 +231,19 @@ public:
return get_accessible_string_property(cbindgen_private::AccessibleStringProperty::Label);
}
/// Returns the accessible-enabled of that element, if any.
std::optional<bool> accessible_enabled() const
{
if (auto result = get_accessible_string_property(
cbindgen_private::AccessibleStringProperty::Enabled)) {
if (*result == "true")
return true;
else if (*result == "false")
return false;
}
return std::nullopt;
}
/// Returns the accessible-value of that element, if any.
std::optional<SharedString> accessible_value() const
{