a11y: setting accessible role and label for windows at the overview

https://bugzilla.gnome.org/show_bug.cgi?id=726670
This commit is contained in:
Alejandro Piñeiro 2014-03-21 12:49:51 +01:00
parent d03239c009
commit df305314c1

View File

@ -8,6 +8,8 @@ const Meta = imports.gi.Meta;
const Pango = imports.gi.Pango; const Pango = imports.gi.Pango;
const Shell = imports.gi.Shell; const Shell = imports.gi.Shell;
const St = imports.gi.St; const St = imports.gi.St;
const Atk = imports.gi.Atk;
const Signals = imports.signals; const Signals = imports.signals;
const DND = imports.ui.dnd; const DND = imports.ui.dnd;
@ -121,6 +123,7 @@ const WindowClone = new Lang.Class({
// the hierarchy that is sized to only the visible portion. // the hierarchy that is sized to only the visible portion.
this.actor = new St.Widget({ reactive: true, this.actor = new St.Widget({ reactive: true,
can_focus: true, can_focus: true,
accessible_role: Atk.Role.PUSH_BUTTON,
layout_manager: new WindowCloneLayout() }); layout_manager: new WindowCloneLayout() });
this.actor.add_child(this._windowClone); this.actor.add_child(this._windowClone);
@ -424,6 +427,7 @@ const WindowOverlay = new Lang.Class({
text: metaWindow.title }); text: metaWindow.title });
title.clutter_text.ellipsize = Pango.EllipsizeMode.END; title.clutter_text.ellipsize = Pango.EllipsizeMode.END;
title._spacing = 0; title._spacing = 0;
windowClone.actor.label_actor = title;
this._updateCaptionId = metaWindow.connect('notify::title', this._updateCaptionId = metaWindow.connect('notify::title',
Lang.bind(this, function(w) { Lang.bind(this, function(w) {