From 3c710f1f32198a4b6cac9083ef89a28dca47180c Mon Sep 17 00:00:00 2001 From: Martin Hatina Date: Tue, 5 May 2015 09:45:25 +0200 Subject: [PATCH] notifications: Make section headings accessible The section headings are useful to understand the content of this panel. https://bugzilla.gnome.org/show_bug.cgi?id=746757 --- panels/notifications/cc-notifications-panel.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/panels/notifications/cc-notifications-panel.c b/panels/notifications/cc-notifications-panel.c index 7a176ae80..e4ab49571 100644 --- a/panels/notifications/cc-notifications-panel.c +++ b/panels/notifications/cc-notifications-panel.c @@ -142,6 +142,7 @@ static void cc_notifications_panel_init (CcNotificationsPanel *panel) { GtkWidget *w; + GtkWidget *label; GError *error = NULL; g_resources_register (cc_notifications_get_resource ()); @@ -184,8 +185,17 @@ cc_notifications_panel_init (CcNotificationsPanel *panel) cc_list_box_update_header_func, NULL, NULL); + label = GTK_WIDGET (gtk_builder_get_object (panel->builder, + "label1")); w = GTK_WIDGET (gtk_builder_get_object (panel->builder, "ccnotify-app-listbox")); + atk_object_add_relationship (ATK_OBJECT (gtk_widget_get_accessible (label)), + ATK_RELATION_LABEL_FOR, + ATK_OBJECT (gtk_widget_get_accessible (w))); + atk_object_add_relationship (ATK_OBJECT (gtk_widget_get_accessible (w)), + ATK_RELATION_LABELLED_BY, + ATK_OBJECT (gtk_widget_get_accessible (label))); + panel->sections = g_list_append (panel->sections, w); panel->sections_reverse = g_list_prepend (panel->sections_reverse, w); g_signal_connect (w, "keynav-failed", G_CALLBACK (keynav_failed), panel);