[evince/set-a11y-names-for-annotation-buttons: 24/24] shell: Set a11y names for annotation buttons



commit bbdf11482efb932bcf8a55ec11b0cf503527638f
Author: Marek Kasik <mkasik redhat com>
Date:   Mon Aug 26 16:23:41 2019 +0200

    shell: Set a11y names for annotation buttons
    
    Buttons for annotations were missing a11y names
    which made it difficult to navigate using a11y
    methods.

 shell/ev-annotations-toolbar.c | 4 +++-
 shell/ev-toolbar.c             | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/shell/ev-annotations-toolbar.c b/shell/ev-annotations-toolbar.c
index 7231d968..0efc6a35 100644
--- a/shell/ev-annotations-toolbar.c
+++ b/shell/ev-annotations-toolbar.c
@@ -98,8 +98,10 @@ ev_annotations_toolbar_create_toggle_button (EvAnnotationsToolbar *toolbar,
 
         gtk_widget_set_tooltip_text (button, tooltip);
 
-        if (label)
+        if (label) {
                 gtk_tool_button_set_label (GTK_TOOL_BUTTON (button), label);
+                atk_object_set_name (gtk_widget_get_accessible (button), label);
+        }
 
         if (icon_name)
                 gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (button), icon_name);
diff --git a/shell/ev-toolbar.c b/shell/ev-toolbar.c
index c4f209f5..44a293dc 100644
--- a/shell/ev-toolbar.c
+++ b/shell/ev-toolbar.c
@@ -224,6 +224,7 @@ ev_toolbar_constructed (GObject *object)
         /* Edit Annots */
         button = ev_toolbar_create_toggle_button (ev_toolbar, "win.toggle-edit-annots", 
"document-edit-symbolic",
                                                   _("Annotate the document"));
+        atk_object_set_name (gtk_widget_get_accessible (button), _("Annotate document"));
         priv->annots_button = button;
         gtk_header_bar_pack_start (GTK_HEADER_BAR (ev_toolbar), button);
 


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