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
This commit is contained in:
parent
a1f68720e5
commit
94493cde35
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user