summaryrefslogtreecommitdiff
path: root/program/js/treelist.js
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2014-06-05 16:44:35 +0200
committerThomas Bruederli <thomas@roundcube.net>2014-06-05 16:44:35 +0200
commitbf33799377eab662f8f25365cf15f57cf6697947 (patch)
tree064e960000b124b1c3089b4a14497636d196f387 /program/js/treelist.js
parent3445ca1a4fbfa7a141872ecf1a5f59649b101ec9 (diff)
Navigate with arrow keys only in treelist widgets; fix keyboard event detection in IE; new text label to help screen readers
Diffstat (limited to 'program/js/treelist.js')
-rw-r--r--program/js/treelist.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/program/js/treelist.js b/program/js/treelist.js
index 958ae81e2..cce4d17fd 100644
--- a/program/js/treelist.js
+++ b/program/js/treelist.js
@@ -747,10 +747,16 @@ function rcube_treelist_widget(node, p)
if (li.length) {
id = dom2id(li);
node = indexbyid[id];
- if (node && node.children.length)
+ if (node && node.children.length && node.collapsed != (keyCode == 37))
toggle(id, rcube_event.get_modifier(e) == SHIFT_KEY); // toggle subtree
}
return false;
+
+ case 9: // Tab
+ // jump to last/first item to move focus away from the treelist widget by tab
+ var limit = rcube_event.get_modifier(e) == SHIFT_KEY ? 'first' : 'last';
+ container.find('li[role=treeitem]:has(a)')[limit]().find('a:'+limit).focus();
+ break;
}
return true;