a11y: check states EXPANDABLE/EXPANDED on PopupSubMenuMenuItem
https://bugzilla.gnome.org/show_bug.cgi?id=708038
This commit is contained in:
parent
c860b96a86
commit
49c8cdd8f6
@ -969,6 +969,7 @@ const PopupSubMenuMenuItem = new Lang.Class({
|
|||||||
this._triangleBin.set_scale(-1.0, 1.0);
|
this._triangleBin.set_scale(-1.0, 1.0);
|
||||||
|
|
||||||
this.actor.add_child(this._triangleBin);
|
this.actor.add_child(this._triangleBin);
|
||||||
|
this.actor.add_accessible_state (Atk.StateType.EXPANDABLE);
|
||||||
|
|
||||||
this.menu = new PopupSubMenu(this.actor, this._triangle);
|
this.menu = new PopupSubMenu(this.actor, this._triangle);
|
||||||
this.menu.connect('open-state-changed', Lang.bind(this, this._subMenuOpenStateChanged));
|
this.menu.connect('open-state-changed', Lang.bind(this, this._subMenuOpenStateChanged));
|
||||||
@ -990,9 +991,11 @@ const PopupSubMenuMenuItem = new Lang.Class({
|
|||||||
if (open) {
|
if (open) {
|
||||||
this.actor.add_style_pseudo_class('open');
|
this.actor.add_style_pseudo_class('open');
|
||||||
this._getTopMenu()._setOpenedSubMenu(this.menu);
|
this._getTopMenu()._setOpenedSubMenu(this.menu);
|
||||||
|
this.actor.add_accessible_state (Atk.StateType.EXPANDED);
|
||||||
} else {
|
} else {
|
||||||
this.actor.remove_style_pseudo_class('open');
|
this.actor.remove_style_pseudo_class('open');
|
||||||
this._getTopMenu()._setOpenedSubMenu(null);
|
this._getTopMenu()._setOpenedSubMenu(null);
|
||||||
|
this.actor.remove_accessible_state (Atk.StateType.EXPANDED);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user