diff options
author | Thomas Bruederli <thomas@roundcube.net> | 2014-05-12 10:32:45 +0200 |
---|---|---|
committer | Thomas Bruederli <thomas@roundcube.net> | 2014-05-12 10:32:45 +0200 |
commit | a2f8fa236143b44f90e53c19806cfd0efa014857 (patch) | |
tree | fcd5c1d586568c0fcd06fe57bdb6ba7a62d8d484 /program/js/app.js | |
parent | 93cd38af7dc7a361af488478c31e946a0c5ea10c (diff) |
Set aria-selected and aria-expanded state attributes
Diffstat (limited to 'program/js/app.js')
-rw-r--r-- | program/js/app.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/program/js/app.js b/program/js/app.js index dd172cd99..06008b2da 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -6967,7 +6967,7 @@ function rcube_webmail() this.hide_menu(this.menu_stack[0], event); } - obj.show().attr('aria-hidden', 'false').data('opener', ref.get(0)); + obj.show().attr('aria-hidden', 'false').data('opener', ref.attr('aria-expanded', 'true').get(0)); this.triggerEvent('menu-open', { name:name, obj:obj, props:prop, originalEvent:event }); this.menu_stack.push(name); @@ -6999,8 +6999,10 @@ function rcube_webmail() this.triggerEvent('menu-close', { name:this.menu_stack[j], obj:obj, props:{ menu:this.menu_stack[j] }, originalEvent:event }); if (this.menu_stack[j] == name) { j = -1; // stop loop - if (keyboard && obj.data('opener')) { - obj.data('opener').focus(); + if (obj.data('opener')) { + $(obj.data('opener')).attr('aria-expanded', 'false'); + if (keyboard) + obj.data('opener').focus(); } } this.menu_stack.pop(); |