From ac233b7b39da180f79461cbdf2fe72f29cf11afe Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Thu, 5 Dec 2019 12:24:05 +0100 Subject: Avoid double a11y description on panel toplevels Do not set an extra a11y name and description on an internal child of the panel, because its toplevel has most of it already through setting the GTK window title. Instead, explicitly set the a11y name and description on the toplevel directly, possibly overriding GTK's value implicitly set via gtk_window_set_title(), but which would be the same anyway. This prevents e.g. a screen reader vocalizing the panel name twice when entering it, once for the toplevel and once for the internal child. This also avoids announcing the panel again when moving from one of the hide buttons to one of the applets or launcher. --- mate-panel/panel-toplevel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mate-panel/panel-toplevel.c b/mate-panel/panel-toplevel.c index c217c907..985ade8e 100644 --- a/mate-panel/panel-toplevel.c +++ b/mate-panel/panel-toplevel.c @@ -1685,7 +1685,7 @@ static void panel_toplevel_update_description(PanelToplevel* toplevel) toplevel->priv->description); panel_a11y_set_atk_name_desc ( - GTK_WIDGET (toplevel->priv->panel_widget), + GTK_WIDGET (toplevel), toplevel->priv->name ? toplevel->priv->name : toplevel->priv->description, toplevel->priv->description); @@ -4854,7 +4854,7 @@ panel_toplevel_update_name (PanelToplevel *toplevel) gtk_window_set_title (GTK_WINDOW (toplevel), title); panel_a11y_set_atk_name_desc ( - GTK_WIDGET (toplevel->priv->panel_widget), + GTK_WIDGET (toplevel), title, toplevel->priv->description); } -- cgit v1.2.1