Skip to content

Commit 183a0d6

Browse files
authored
[a11y] If there is no action, return immediately (#76)
1 parent 2ac5f1c commit 183a0d6

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

flutter/third_party/accessibility/ax/platform/ax_platform_node_auralinux.cc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,15 @@ namespace atk_action {
596596

597597
gboolean DoAction(AtkAction* atk_action, gint index) {
598598
g_return_val_if_fail(ATK_IS_ACTION(atk_action), FALSE);
599-
g_return_val_if_fail(!index, FALSE);
599+
// TODO(JSUYA): The index of DoAction is the number of the action that can be
600+
// called. If there is no action that can be called in atk, the index is
601+
// passed as -1. Currently, our AXPlatformNode only supports default actions,
602+
// so we need to distinguish between -1 and numbers greater than 0. In Tizen,
603+
// the DoActionName function in atk causes this problem. Since at-spi2-atk in
604+
// tizen is not under our management scope, we temporarily return immediately
605+
// when it is -1 to prevent unnecessary error messages.
606+
if (index < 0)
607+
return FALSE;
600608

601609
AtkObject* atk_object = ATK_OBJECT(atk_action);
602610
AXPlatformNodeAuraLinux* obj =

0 commit comments

Comments
 (0)