From 1575ce30514fabca90126a0ed2b782dc01c35729 Mon Sep 17 00:00:00 2001 From: HolgerGottChristensen Date: Fri, 1 Nov 2024 17:28:48 +0100 Subject: [PATCH] Update platforms/macos/src/node.rs Co-authored-by: Arnold Loubriat --- platforms/macos/src/node.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/platforms/macos/src/node.rs b/platforms/macos/src/node.rs index 6769f6a9..5b2b43f4 100644 --- a/platforms/macos/src/node.rs +++ b/platforms/macos/src/node.rs @@ -241,13 +241,7 @@ fn ns_sub_role(node: &Node) -> &'static NSAccessibilitySubrole { Role::AlertDialog => ns_string!("AXApplicationAlertDialog"), Role::Article => ns_string!("AXDocumentArticle"), Role::Banner => ns_string!("AXLandmarkBanner"), - Role::Button => { - if node.toggled().is_some() { - NSAccessibilityToggleSubrole - } else { - NSAccessibilityUnknownSubrole - } - } + Role::Button if node.toggled().is_some() => NSAccessibilityToggleSubrole, Role::Code => ns_string!("AXCodeStyleGroup"), Role::Complementary => ns_string!("AXLandmarkComplementary"), Role::ContentDeletion => ns_string!("AXDeleteStyleGroup"),