Skip to content

Commit

Permalink
Add isEnabled to MacOS adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
HolgerGottChristensen committed Oct 27, 2024
1 parent 29fa341 commit 449c3a5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions platforms/macos/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,11 @@ declare_class!(
.unwrap_or(false)
}

#[method(isAccessibilityEnabled)]
fn enabled(&self) -> bool {
self.resolve(|node| !node.is_disabled()).unwrap_or(true)
}

#[method(setAccessibilityFocused:)]
fn set_focused(&self, focused: bool) {
self.resolve_with_context(|node, context| {
Expand Down Expand Up @@ -806,6 +811,7 @@ declare_class!(
|| selector == sel!(accessibilityChildrenInNavigationOrder)
|| selector == sel!(accessibilityFrame)
|| selector == sel!(accessibilityRole)
|| selector == sel!(isAccessibilityEnabled)
|| selector == sel!(accessibilityWindow)
|| selector == sel!(accessibilityTopLevelUIElement)
|| selector == sel!(accessibilityRoleDescription)
Expand Down

0 comments on commit 449c3a5

Please sign in to comment.