Add the accessible-read-only property

This commit is contained in:
Arnold Loubriat 2025-02-18 23:20:17 +01:00 committed by Simon Hausmann
parent e5c27d57ca
commit cc91de2d38
18 changed files with 60 additions and 1 deletions

View file

@ -394,6 +394,7 @@ public:
}
return std::nullopt;
}
/// Returns the accessible-expandable of that element, if any.
std::optional<bool> accessible_expandable() const
{
@ -407,6 +408,19 @@ public:
return std::nullopt;
}
/// Returns the accessible-read-only of that element, if any.
std::optional<bool> accessible_read_only() const
{
if (auto result = get_accessible_string_property(
cbindgen_private::AccessibleStringProperty::ReadOnly)) {
if (*result == "true")
return true;
else if (*result == "false")
return false;
}
return std::nullopt;
}
/// Invokes the expand accessibility action of that element
/// (`accessible-action-expand`).
void invoke_accessible_expand_action() const