From f3b09a87254311372961abcf0f2d67e20f05f306 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Tyrychtr?= Date: Tue, 21 Feb 2023 15:13:11 +0100 Subject: [PATCH] GtkNotebook: Improve the labels of notebook pages for a11y --- gtk/gtknotebook.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index 7e75048ce8..4bc105726f 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -4034,9 +4034,6 @@ gtk_notebook_insert_notebook_page (GtkNotebook *notebook, g_signal_connect (controller, "enter", G_CALLBACK (gtk_notebook_tab_drop_enter), page); g_signal_connect (controller, "leave", G_CALLBACK (gtk_notebook_tab_drop_leave), page); gtk_widget_add_controller (page->tab_widget, controller); - gtk_accessible_update_property (GTK_ACCESSIBLE (page->tab_widget), - GTK_ACCESSIBLE_PROPERTY_LABEL, _("Tab"), - -1); page->expand = FALSE; page->fill = TRUE; @@ -4338,6 +4335,11 @@ gtk_notebook_update_labels (GtkNotebook *notebook) text = page->tab_text; else text = string; + + gtk_accessible_update_property (GTK_ACCESSIBLE (page->tab_widget), + GTK_ACCESSIBLE_PROPERTY_LABEL, text, + -1); + if (notebook->show_tabs) { if (page->default_tab)