[gnome-shell] a11y: check states EXPANDABLE/EXPANDED on PopupSubMenuMenuItem



commit 49c8cdd8f63b4b97ac085ce51d1ef0b1fd8791e6
Author: Alejandro Piñeiro <apinheiro igalia com>
Date:   Sat Sep 14 01:29:21 2013 +0200

    a11y: check states EXPANDABLE/EXPANDED on PopupSubMenuMenuItem
    
    https://bugzilla.gnome.org/show_bug.cgi?id=708038

 js/ui/popupMenu.js |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js
index adff1c6..3e57562 100644
--- a/js/ui/popupMenu.js
+++ b/js/ui/popupMenu.js
@@ -969,6 +969,7 @@ const PopupSubMenuMenuItem = new Lang.Class({
             this._triangleBin.set_scale(-1.0, 1.0);
 
         this.actor.add_child(this._triangleBin);
+        this.actor.add_accessible_state (Atk.StateType.EXPANDABLE);
 
         this.menu = new PopupSubMenu(this.actor, this._triangle);
         this.menu.connect('open-state-changed', Lang.bind(this, this._subMenuOpenStateChanged));
@@ -990,9 +991,11 @@ const PopupSubMenuMenuItem = new Lang.Class({
         if (open) {
             this.actor.add_style_pseudo_class('open');
             this._getTopMenu()._setOpenedSubMenu(this.menu);
+            this.actor.add_accessible_state (Atk.StateType.EXPANDED);
         } else {
             this.actor.remove_style_pseudo_class('open');
             this._getTopMenu()._setOpenedSubMenu(null);
+            this.actor.remove_accessible_state (Atk.StateType.EXPANDED);
         }
     },
 


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