From 94493cde354d1acbc96aedc7ed12eb4e2cd81506 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= Date: Fri, 16 Mar 2012 17:17:23 +0100 Subject: [PATCH] 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 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/ui/searchDisplay.js b/js/ui/searchDisplay.js index 0a3229257..fb1ca73e0 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();