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 <pwithnall@endlessos.org>

Fixes: #52
This commit is contained in:
Philip Withnall 2022-07-25 23:08:06 +02:00
parent 2f64f3865e
commit 2e72916afb
1 changed files with 2 additions and 0 deletions

View File

@ -357,6 +357,8 @@ create_row_for_app_cb (gpointer item,
adw_action_row_add_suffix (ADW_ACTION_ROW (row), w); adw_action_row_add_suffix (ADW_ACTION_ROW (row), w);
adw_action_row_set_activatable_widget (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 */ /* Fetch status from AccountService */
g_object_set_data (G_OBJECT (row), "GtkSwitch", w); 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); g_object_set_data_full (G_OBJECT (w), "GAppInfo", g_object_ref (app), g_object_unref);