4 * Copyright 2010, Moxiecode Systems AB
5 * Released under LGPL License.
7 * License: http://tinymce.moxiecode.com/license
8 * Contributing: http://tinymce.moxiecode.com/contributing
12 // Shorten class names
13 var dom = tinymce.DOM, each = tinymce.each, Event = tinymce.dom.Event;
15 * This class is used to group a set of toolbars together and control the keyboard navigation and focus.
17 * @class tinymce.ui.ToolbarGroup
18 * @extends tinymce.ui.Container
20 tinymce.create('tinymce.ui.ToolbarGroup:tinymce.ui.Container', {
22 * Renders the toolbar group as a HTML string.
25 * @return {String} HTML for the toolbar control.
27 renderHTML : function() {
28 var t = this, h = [], controls = t.controls, each = tinymce.each, settings = t.settings;
30 h.push('<div id="' + t.id + '" role="group" aria-labelledby="' + t.id + '_voice">');
31 //TODO: ACC test this out - adding a role = application for getting the landmarks working well.
32 h.push("<span role='application'>");
33 h.push('<span id="' + t.id + '_voice" class="mceVoiceLabel" style="display:none;">' + dom.encode(settings.name) + '</span>');
34 each(controls, function(toolbar) {
35 h.push(toolbar.renderHTML());
47 postRender : function() {
48 var t = this, items = [];
50 each(t.controls, function(toolbar) {
51 each (toolbar.controls, function(control) {
58 t.keyNav = new tinymce.ui.KeyboardNavigation({
61 onCancel: function() {
64 excludeFromTabOrder: !t.settings.tab_focus_toolbar
68 destroy : function() {
72 self.keyNav.destroy();