[gnome-shell] a11y: setting the proper role/label_actor for SearchResult.content



commit 94493cde354d1acbc96aedc7ed12eb4e2cd81506
Author: Alejandro PiÃeiro <apinheiro igalia com>
Date:   Fri Mar 16 17:17:23 2012 +0100

    a11y: setting the proper role/label_actor for SearchResult.content
    
    role/label_actor should be used for the actor that will receive
    the focus. In some cases it was also (wrongly) set on the
    container, so using an AT like Orca, it exposed both.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=672242

 js/ui/searchDisplay.js |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/searchDisplay.js b/js/ui/searchDisplay.js
index 0a32292..fb1ca73 100644
--- a/js/ui/searchDisplay.js
+++ b/js/ui/searchDisplay.js
@@ -5,6 +5,7 @@ const Lang = imports.lang;
 const Gtk = imports.gi.Gtk;
 const Meta = imports.gi.Meta;
 const St = imports.gi.St;
+const Atk = imports.gi.Atk;
 
 const DND = imports.ui.dnd;
 const IconGrid = imports.ui.iconGrid;
@@ -33,12 +34,13 @@ const SearchResult = new Lang.Class({
             content = new St.Bin({ style_class: 'search-result-content',
                                    reactive: true,
                                    can_focus: true,
-                                   track_hover: true });
+                                   track_hover: true,
+                                   accessible_role: Atk.Role.PUSH_BUTTON });
             let icon = new IconGrid.BaseIcon(this.metaInfo['name'],
                                              { createIcon: this.metaInfo['createIcon'] });
             content.set_child(icon.actor);
             this._dragActorSource = icon.icon;
-            this.actor.label_actor = icon.label;
+            content.label_actor = icon.label;
         } else {
             if (content._delegate && content._delegate.getDragActorSource)
                 this._dragActorSource = content._delegate.getDragActorSource();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]