From a5baeac4288d451e91f725cb681d8ab783f46c03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= Date: Sat, 10 Mar 2012 02:27:19 +0100 Subject: [PATCH] a11y: Setting role and label-actor for runDialog https://bugzilla.gnome.org/show_bug.cgi?id=670308 --- js/ui/modalDialog.js | 4 +++- js/ui/runDialog.js | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/js/ui/modalDialog.js b/js/ui/modalDialog.js index 1bb9a48dd..f731f5787 100644 --- a/js/ui/modalDialog.js +++ b/js/ui/modalDialog.js @@ -10,6 +10,7 @@ const Pango = imports.gi.Pango; const St = imports.gi.St; const Shell = imports.gi.Shell; const Signals = imports.signals; +const Atk = imports.gi.Atk; const Params = imports.misc.params; @@ -42,7 +43,8 @@ const ModalDialog = new Lang.Class({ this._group = new St.Widget({ visible: false, x: 0, - y: 0 }); + y: 0, + accessible_role: Atk.Role.DIALOG }); Main.uiGroup.add_actor(this._group); let constraint = new Clutter.BindConstraint({ source: global.stage, diff --git a/js/ui/runDialog.js b/js/ui/runDialog.js index a41225f4f..5bfd4eda8 100644 --- a/js/ui/runDialog.js +++ b/js/ui/runDialog.js @@ -209,6 +209,8 @@ const RunDialog = new Lang.Class({ let entry = new St.Entry({ style_class: 'run-dialog-entry' }); ShellEntry.addContextMenu(entry); + entry.label_actor = label; + this._entryText = entry.clutter_text; this.contentLayout.add(entry, { y_align: St.Align.START }); this.setInitialKeyFocus(this._entryText);