summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColomban Wendling <[email protected]>2019-12-05 12:24:05 +0100
committerraveit65 <[email protected]>2020-01-14 14:35:23 +0100
commitac233b7b39da180f79461cbdf2fe72f29cf11afe (patch)
treebe819bd0becda1f6bc59f360022734f990c3e499
parent616ef95ed3a39469461bf883a01e794ea8fefb85 (diff)
downloadmate-panel-ac233b7b39da180f79461cbdf2fe72f29cf11afe.tar.bz2
mate-panel-ac233b7b39da180f79461cbdf2fe72f29cf11afe.tar.xz
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.
-rw-r--r--mate-panel/panel-toplevel.c4
1 files 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);
}