[gnome-control-center] Add missing a11y labels



commit af197cb813d3a3e747894f6a50156f67cc481529
Author: Lukáš Tyrychtr <lukastyrychtr gmail com>
Date:   Tue May 31 13:29:40 2022 +0200

    Add missing a11y labels

 panels/sharing/cc-sharing-networks.c |  3 +++
 panels/sharing/cc-sharing-panel.c    | 12 ++++++++++++
 panels/sharing/cc-sharing-panel.ui   | 17 +++++++++++++++++
 3 files changed, 32 insertions(+)
---
diff --git a/panels/sharing/cc-sharing-networks.c b/panels/sharing/cc-sharing-networks.c
index c7beac1fb..0ebbbfee9 100644
--- a/panels/sharing/cc-sharing-networks.c
+++ b/panels/sharing/cc-sharing-networks.c
@@ -219,6 +219,9 @@ cc_sharing_networks_new_row (const char        *uuid,
   w = gtk_button_new_from_icon_name ("window-close-symbolic");
   gtk_widget_add_css_class (w, "flat");
   gtk_widget_set_valign (w, GTK_ALIGN_CENTER);
+  gtk_accessible_update_property (GTK_ACCESSIBLE (w),
+                                GTK_ACCESSIBLE_PROPERTY_LABEL, _("Remove"),
+                                -1);
   adw_action_row_add_suffix (ADW_ACTION_ROW (row), w);
   g_signal_connect_object (G_OBJECT (w), "clicked",
                            G_CALLBACK (cc_sharing_networks_remove_network), self, G_CONNECT_SWAPPED);
diff --git a/panels/sharing/cc-sharing-panel.c b/panels/sharing/cc-sharing-panel.c
index 3d8efd071..ac189c699 100644
--- a/panels/sharing/cc-sharing-panel.c
+++ b/panels/sharing/cc-sharing-panel.c
@@ -642,6 +642,9 @@ cc_sharing_panel_new_media_sharing_row (const char     *uri_or_path,
   w = gtk_button_new_from_icon_name ("window-close-symbolic");
   gtk_widget_add_css_class (w, "flat");
   gtk_widget_set_valign (w, GTK_ALIGN_CENTER);
+  gtk_accessible_update_property (GTK_ACCESSIBLE (w),
+                                GTK_ACCESSIBLE_PROPERTY_LABEL, _("Remove"),
+                                -1);
   adw_action_row_add_suffix (ADW_ACTION_ROW (row), w);
   g_signal_connect_object (G_OBJECT (w), "clicked",
                            G_CALLBACK (cc_sharing_panel_remove_folder), self, G_CONNECT_SWAPPED);
@@ -665,6 +668,9 @@ cc_sharing_panel_new_add_media_sharing_row (CcSharingPanel *self)
   gtk_widget_set_hexpand (w, TRUE);
   gtk_widget_set_margin_top (w, 12);
   gtk_widget_set_margin_bottom (w, 12);
+  gtk_accessible_update_property (GTK_ACCESSIBLE (w),
+                                GTK_ACCESSIBLE_PROPERTY_LABEL, _("Add"),
+                                -1);
   gtk_box_append (GTK_BOX (box), w);
 
   g_object_set_data (G_OBJECT (w), "row", row);
@@ -726,6 +732,9 @@ cc_sharing_panel_setup_media_sharing_dialog (CcSharingPanel *self)
   gtk_grid_attach (GTK_GRID (self->shared_folders_grid), networks, 0, 4, 2, 1);
 
   w = create_switch_with_bindings (GTK_SWITCH (g_object_get_data (G_OBJECT (networks), "switch")));
+  gtk_accessible_update_property (GTK_ACCESSIBLE (w),
+                                GTK_ACCESSIBLE_PROPERTY_LABEL, _("Enable media sharing"),
+                                -1);
   gtk_header_bar_pack_start (GTK_HEADER_BAR (self->media_sharing_headerbar), w);
   self->media_sharing_switch = w;
 
@@ -929,6 +938,9 @@ cc_sharing_panel_setup_personal_file_sharing_dialog (CcSharingPanel *self)
   gtk_grid_attach (GTK_GRID (self->personal_file_sharing_grid), networks, 0, 3, 2, 1);
 
   w = create_switch_with_bindings (GTK_SWITCH (g_object_get_data (G_OBJECT (networks), "switch")));
+  gtk_accessible_update_property (GTK_ACCESSIBLE (w),
+                                GTK_ACCESSIBLE_PROPERTY_LABEL, _("Enable personal media sharing"),
+                                -1);
   gtk_header_bar_pack_start (GTK_HEADER_BAR (self->personal_file_sharing_headerbar), w);
   self->personal_file_sharing_switch = w;
 
diff --git a/panels/sharing/cc-sharing-panel.ui b/panels/sharing/cc-sharing-panel.ui
index 8299e4311..ab1e61989 100644
--- a/panels/sharing/cc-sharing-panel.ui
+++ b/panels/sharing/cc-sharing-panel.ui
@@ -231,6 +231,7 @@
                     <property name="label" translatable="yes">Remote Login</property>
                     <property name="hexpand">True</property>
                     <property name="xalign">0</property>
+                    <property name="mnemonic_widget">remote_login_switch</property>
                   </object>
                 </child>
                 <child>
@@ -268,6 +269,7 @@
                   <object class="AdwActionRow">
                     <property name="title" translatable="yes">Remote Desktop</property>
                     <property name="subtitle" translatable="yes">Enable or disable remote desktop 
connections to this computer.</property>
+                    <property name="activatable_widget">remote_desktop_switch</property>
                     <child type="suffix">
                       <object class="GtkSwitch" id="remote_desktop_switch">
                         <property name="state">False</property>
@@ -281,6 +283,7 @@
                   <object class="AdwActionRow">
                     <property name="title" translatable="yes">Remote Control</property>
                     <property name="subtitle" translatable="yes">Allows remote connections to control the 
screen.</property>
+                    <property name="activatable_widget">remote_control_switch</property>
                     <child type="suffix">
                       <object class="GtkSwitch" id="remote_control_switch">
                         <property name="valign">center</property>
@@ -311,6 +314,9 @@
                           <object class="GtkButton" id="remote_desktop_device_name_copy">
                             <property name="valign">center</property>
                             <property name="icon-name">edit-copy-symbolic</property>
+                            <accessibility>
+                              <property name="label" translatable="yes">Copy</property>
+                            </accessibility>
                             <style>
                               <class name="flat"/>
                             </style>
@@ -335,6 +341,9 @@
                           <object class="GtkButton" id="remote_desktop_address_copy">
                             <property name="valign">center</property>
                             <property name="icon-name">edit-copy-symbolic</property>
+                            <accessibility>
+                              <property name="label" translatable="yes">Copy</property>
+                            </accessibility>
                             <style>
                               <class name="flat"/>
                             </style>
@@ -355,6 +364,7 @@
                 <child>
                   <object class="AdwActionRow">
                     <property name="title" translatable="yes">User Name</property>
+                    <property name="activatable_widget">remote_desktop_username_entry</property>
                     <child type="suffix">
                       <object class="GtkEntry" id="remote_desktop_username_entry">
                         <property name="hexpand">True</property>
@@ -365,6 +375,9 @@
                       <object class="GtkButton" id="remote_desktop_username_copy">
                         <property name="valign">center</property>
                         <property name="icon-name">edit-copy-symbolic</property>
+                        <accessibility>
+                          <property name="label" translatable="yes">Copy</property>
+                        </accessibility>
                         <style>
                           <class name="flat"/>
                         </style>
@@ -376,6 +389,7 @@
                 <child>
                   <object class="AdwActionRow">
                     <property name="title" translatable="yes">Password</property>
+                    <property name="activatable_widget">remote_desktop_password_entry</property>
                     <child type="suffix">
                       <object class="GtkPasswordEntry" id="remote_desktop_password_entry">
                         <property name="hexpand">True</property>
@@ -387,6 +401,9 @@
                       <object class="GtkButton" id="remote_desktop_password_copy">
                         <property name="valign">center</property>
                         <property name="icon-name">edit-copy-symbolic</property>
+                        <accessibility>
+                          <property name="label" translatable="yes">Copy</property>
+                        </accessibility>
                         <style>
                           <class name="flat"/>
                         </style>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]