/*!
- * OOUI v0.27.3
+ * OOUI v0.28.0
* https://www.mediawiki.org/wiki/OOUI
*
* Copyright 2011–2018 OOUI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2018-06-07T21:36:30Z
+ * Date: 2018-08-14T23:16:18Z
*/
( function ( OO ) {
} )
.fail( function () {
widget.lookupMenu.clearItems();
+ widget.lookupMenu.toggle( false );
} );
}
this.active = false;
// Initialization
- this.$element.addClass( 'oo-ui-tabPanelLayout' );
+ this.$element
+ .addClass( 'oo-ui-tabPanelLayout' )
+ .attr( 'role', 'tabpanel' );
};
/* Setup */
* @chainable
*/
OO.ui.TabPanelLayout.prototype.setupTabItem = function () {
+ this.$element.attr( 'aria-labelledby', this.tabItem.getElementId() );
+
+ this.tabItem.$element.attr( 'aria-controls', this.getElementId() );
+
if ( this.label ) {
this.tabItem.setLabel( this.label );
}
OO.ui.TabOptionWidget.parent.call( this, config );
// Initialization
- this.$element.addClass( 'oo-ui-tabOptionWidget' );
+ this.$element
+ .addClass( 'oo-ui-tabOptionWidget' )
+ .attr( 'role', 'tab' );
};
/* Setup */
} );
// Initialization
- this.$element.addClass( 'oo-ui-tabSelectWidget' );
+ this.$element
+ .addClass( 'oo-ui-tabSelectWidget' )
+ .attr( 'role', 'tablist' );
};
/* Setup */
*
* @constructor
* @param {Object} [config] Configuration options
+ * @deprecated
*/
OO.ui.CapsuleItemWidget = function OoUiCapsuleItemWidget( config ) {
// Configuration initialization
* the containing `<div>` and has a larger area. By default, the menu uses
* relative positioning.
* See <https://www.mediawiki.org/wiki/OOUI/Concepts#Overlays>.
+ * @deprecated
*/
OO.ui.CapsuleMultiselectWidget = function OoUiCapsuleMultiselectWidget( config ) {
var $tabFocus;
}.bind( this ) );
this.onMenuItemsChange();
+
+ // Deprecation warning
+ OO.ui.warnDeprecation( 'CapsuleMultiselectWidget: Deprecated widget. Use TagMultiselectWidget instead. See T183299.' );
};
/* Setup */
}
};
+/**
+ * @inheritdoc
+ */
+OO.ui.MenuTagMultiselectWidget.prototype.setDisabled = function ( isDisabled ) {
+ // Parent method
+ OO.ui.MenuTagMultiselectWidget.parent.prototype.setDisabled.call( this, isDisabled );
+
+ if ( this.menu ) {
+ // Protect against calling setDisabled() before the menu was initialized
+ this.menu.setDisabled( isDisabled );
+ }
+};
+
/**
* Highlight the first selectable item in the menu, if configured.
*