76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass * Provides Tab instances for use with TabView
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass * @param config {Object} Object literal specifying tabview configuration properties.
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass * @class Tab
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass * @constructor
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass * @extends Widget
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass * @uses WidgetChild
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav GlassY.Tab = Y.Base.create('tab', Y.Widget, [Y.WidgetChild], {
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass BOUNDING_TEMPLATE: '<li class="' + _classNames.tab + '"></li>',
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass CONTENT_TEMPLATE: '<a class="' + _classNames.tabLabel + '"></a>',
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass PANEL_TEMPLATE: '<div class="' + _classNames.tabPanel + '"></div>',
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass this.get('panelNode').toggleClass(_classNames.selectedPanel, selected);
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass _initAria: function() {
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass // Apply the ARIA roles, states and properties to each tab
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass anchor.get('parentNode').set('role', 'presentation');
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass // Apply the ARIA roles, states and properties to each panel
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass syncUI: function() {
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass bindUI: function() {
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass this.after('selectedChange', this._afterTabSelectedChange);
76ca635d61eb3f9fb7c9d788a44fa8b1690aa138Dav Glass this.after('parentChange', this._afterParentChange);
renderUI: function() {
this._renderPanel();
this._initAria();
_renderPanel: function() {
_add: function() {
if (list) {
if (panel) {
_remove: function() {
_onActivate: function(e) {
if (e.target === this) {
initializer: function() {
return label;
return content;
_defPanelNodeValueFn: function() {
if (panel) {
return panel;
ATTRS: {
triggerEvent: {
label: {
content: {
panelNode: {
if (node) {
return node;
tabIndex: {
value: null,
HTML_PARSER: {
return ret;