a11y: Setting role and label-actor for runDialog

https://bugzilla.gnome.org/show_bug.cgi?id=670308
This commit is contained in:
Alejandro Piñeiro 2012-03-10 02:27:19 +01:00
parent e23e04953c
commit a5baeac428
2 changed files with 5 additions and 1 deletions

View File

@ -10,6 +10,7 @@ const Pango = imports.gi.Pango;
const St = imports.gi.St; const St = imports.gi.St;
const Shell = imports.gi.Shell; const Shell = imports.gi.Shell;
const Signals = imports.signals; const Signals = imports.signals;
const Atk = imports.gi.Atk;
const Params = imports.misc.params; const Params = imports.misc.params;
@ -42,7 +43,8 @@ const ModalDialog = new Lang.Class({
this._group = new St.Widget({ visible: false, this._group = new St.Widget({ visible: false,
x: 0, x: 0,
y: 0 }); y: 0,
accessible_role: Atk.Role.DIALOG });
Main.uiGroup.add_actor(this._group); Main.uiGroup.add_actor(this._group);
let constraint = new Clutter.BindConstraint({ source: global.stage, let constraint = new Clutter.BindConstraint({ source: global.stage,

View File

@ -209,6 +209,8 @@ const RunDialog = new Lang.Class({
let entry = new St.Entry({ style_class: 'run-dialog-entry' }); let entry = new St.Entry({ style_class: 'run-dialog-entry' });
ShellEntry.addContextMenu(entry); ShellEntry.addContextMenu(entry);
entry.label_actor = label;
this._entryText = entry.clutter_text; this._entryText = entry.clutter_text;
this.contentLayout.add(entry, { y_align: St.Align.START }); this.contentLayout.add(entry, { y_align: St.Align.START });
this.setInitialKeyFocus(this._entryText); this.setInitialKeyFocus(this._entryText);