From 2e72916afbc3dc08b5914d69e19abf141c664e09 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Mon, 25 Jul 2022 23:08:06 +0200 Subject: [PATCH] restrict-applications-selector: Make rows not focusable The toggle switches remain focusable, but the rows should not be focusable. Otherwise tabbing through the list involves two tabs per row. The screen reader continues to work correctly with this MR applied: when tabbing to a new switch, it reads out the label from the row, plus the switch state. Signed-off-by: Philip Withnall Fixes: #52 --- libmalcontent-ui/restrict-applications-selector.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libmalcontent-ui/restrict-applications-selector.c b/libmalcontent-ui/restrict-applications-selector.c index 1196284..2da2eee 100644 --- a/libmalcontent-ui/restrict-applications-selector.c +++ b/libmalcontent-ui/restrict-applications-selector.c @@ -357,6 +357,8 @@ create_row_for_app_cb (gpointer item, adw_action_row_add_suffix (ADW_ACTION_ROW (row), w); adw_action_row_set_activatable_widget (ADW_ACTION_ROW (row), w); + gtk_widget_set_focusable (GTK_WIDGET (row), FALSE); + /* Fetch status from AccountService */ g_object_set_data (G_OBJECT (row), "GtkSwitch", w); g_object_set_data_full (G_OBJECT (w), "GAppInfo", g_object_ref (app), g_object_unref);