From 7b84aa9ba434513969a5ab8b219daf9703c597ce Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Mon, 21 Feb 2022 11:10:26 +1300 Subject: [PATCH] Generate a11y events for widgets that use kFlutterSemanticsFlagIsToggled. ATK only uses a "checked" state, where Flutter has both Checked and Toggled. --- shell/platform/linux/fl_accessible_node.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/shell/platform/linux/fl_accessible_node.cc b/shell/platform/linux/fl_accessible_node.cc index 21cdb24de985a..924fc14ae8b06 100644 --- a/shell/platform/linux/fl_accessible_node.cc +++ b/shell/platform/linux/fl_accessible_node.cc @@ -16,7 +16,10 @@ static struct { {ATK_STATE_CHECKABLE, kFlutterSemanticsFlagHasCheckedState, FALSE}, {ATK_STATE_FOCUSABLE, kFlutterSemanticsFlagIsFocusable, FALSE}, {ATK_STATE_FOCUSED, kFlutterSemanticsFlagIsFocused, FALSE}, - {ATK_STATE_CHECKED, kFlutterSemanticsFlagIsChecked, FALSE}, + {ATK_STATE_CHECKED, + static_cast(kFlutterSemanticsFlagIsChecked | + kFlutterSemanticsFlagIsToggled), + FALSE}, {ATK_STATE_SELECTED, kFlutterSemanticsFlagIsSelected, FALSE}, {ATK_STATE_ENABLED, kFlutterSemanticsFlagIsEnabled, FALSE}, {ATK_STATE_READ_ONLY, kFlutterSemanticsFlagIsReadOnly, FALSE},