summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColomban Wendling <[email protected]>2019-12-05 12:24:05 +0100
committermonsta <[email protected]>2020-01-16 16:17:46 +0300
commit09efe6ee7ed200e97f645d8034109382ca45272c (patch)
tree58d258649d4dea84623c70927bfec08b19b146a3
parentf56fabf655d5b2ae9286bd89e103ba284ff616f3 (diff)
downloadmate-panel-09efe6ee7ed200e97f645d8034109382ca45272c.tar.bz2
mate-panel-09efe6ee7ed200e97f645d8034109382ca45272c.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 f8b56979..fa1508d7 100644
--- a/mate-panel/panel-toplevel.c
+++ b/mate-panel/panel-toplevel.c
@@ -1695,7 +1695,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);
@@ -4879,7 +4879,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);
}