From b55000d865a457b2d38b3321e1dbb359e9a64d7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Sat, 26 Jul 2025 11:26:47 -0700 Subject: [PATCH 1/2] EncryptView: make warnings messages screen reader accessible --- src/Views/EncryptView.vala | 28 +++++++++++++++++++++++++--- src/Widgets/DescriptionRow.vala | 8 ++++++++ 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/src/Views/EncryptView.vala b/src/Views/EncryptView.vala index 01b69559c..e93158296 100644 --- a/src/Views/EncryptView.vala +++ b/src/Views/EncryptView.vala @@ -70,6 +70,15 @@ public class EncryptView : AbstractInstallerView { "slate" ); + var message_box = new Gtk.ListBox () { + selection_mode = BROWSE + }; + message_box.add_css_class (Granite.STYLE_CLASS_RICH_LIST); + message_box.add_css_class (Granite.STYLE_CLASS_BACKGROUND); + message_box.append (protect_row); + message_box.append (restart_row); + message_box.append (keyboard_row); + var pw_label = new Granite.HeaderLabel (_("Encryption Password")) { secondary_text = _("A unique password for this device; not the password for your user account.") }; @@ -108,9 +117,7 @@ public class EncryptView : AbstractInstallerView { title_area.append (title_label); content_area.valign = CENTER; - content_area.append (protect_row); - content_area.append (restart_row); - content_area.append (keyboard_row); + content_area.append (message_box); content_area.append (password_box); encrypt_button = new Gtk.Button.with_label (_("Set Encryption Password")) { @@ -148,6 +155,21 @@ public class EncryptView : AbstractInstallerView { confirm_entry.is_valid = confirm_password (); update_next_button (); }); + + // Forward keys so we can type immediate when list is focused + var key_controller = new Gtk.EventControllerKey (); + key_controller.key_pressed.connect ((keyval, keycode, state) => { + if (keyval <= 65000) { + key_controller.forward (pw_entry.get_delegate ()); + pw_entry.grab_focus (); + pw_entry.select_region (-1, -1); + return Gdk.EVENT_STOP; + } + + return Gdk.EVENT_PROPAGATE; + }); + + message_box.add_controller (key_controller); } private bool check_password () { diff --git a/src/Widgets/DescriptionRow.vala b/src/Widgets/DescriptionRow.vala index a9ace185e..6ce7d528b 100644 --- a/src/Widgets/DescriptionRow.vala +++ b/src/Widgets/DescriptionRow.vala @@ -34,5 +34,13 @@ public class DescriptionRow : Gtk.Box { spacing = 12; append (image); append (description_label); + + // prevent titles from being skipped + map.connect (() => { + parent.update_property ( + Gtk.AccessibleProperty.LABEL, description, + -1 + ); + }); } } From 902b70593b5bf4ee7f1f89a9c4b0a46853eb196a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Mon, 11 Aug 2025 11:06:22 -0700 Subject: [PATCH 2/2] Replace check for character --- src/Views/EncryptView.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Views/EncryptView.vala b/src/Views/EncryptView.vala index e93158296..9fe5bf241 100644 --- a/src/Views/EncryptView.vala +++ b/src/Views/EncryptView.vala @@ -159,7 +159,7 @@ public class EncryptView : AbstractInstallerView { // Forward keys so we can type immediate when list is focused var key_controller = new Gtk.EventControllerKey (); key_controller.key_pressed.connect ((keyval, keycode, state) => { - if (keyval <= 65000) { + if (Gdk.keyval_to_unicode (keyval) != 0) { key_controller.forward (pw_entry.get_delegate ()); pw_entry.grab_focus (); pw_entry.select_region (-1, -1);