jenkins-bot has submitted this change and it was merged.
Change subject: TabIndexelement: Add description, example, and mark private
method
......................................................................
TabIndexelement: Add description, example, and mark private method
Change-Id: Ie8e247d71148457531e0cfce9885ec33932d0ba1
---
M src/elements/TabIndexedElement.js
1 file changed, 25 insertions(+), 1 deletion(-)
Approvals:
Jforrester: Looks good to me, approved
jenkins-bot: Verified
diff --git a/src/elements/TabIndexedElement.js
b/src/elements/TabIndexedElement.js
index fa1954f..70b3ef9 100644
--- a/src/elements/TabIndexedElement.js
+++ b/src/elements/TabIndexedElement.js
@@ -1,5 +1,28 @@
/**
- * Element supporting "sequential focus navigation" using the 'tabindex'
attribute.
+ * The TabIndexedElement class is an attribute mixin used to add additional
functionality to an
+ * element created by another class. The mixin provides a ‘tabIndex’ property,
which specifies the
+ * order in which users will navigate through the focusable elements via the
"tab" key.
+ *
+ * @example
+ * // TabIndexedElement is mixed into the ButtonWidget class
+ * // to provide a tabIndex property.
+ * var button1 = new OO.ui.ButtonWidget( {
+ * label : 'fourth',
+ * tabIndex : 4
+ * } );
+ * var button2 = new OO.ui.ButtonWidget( {
+ * label : 'second',
+ * tabIndex : 2
+ * } );
+ * var button3 = new OO.ui.ButtonWidget( {
+ * label : 'third',
+ * tabIndex : 3
+ * } );
+ * var button4 = new OO.ui.ButtonWidget( {
+ * label : 'first',
+ * tabIndex : 1
+ * } );
+ * $( 'body' ).append( button1.$element, button2.$element,
button3.$element, button4.$element );
*
* @abstract
* @class
@@ -92,6 +115,7 @@
/**
* Handle disable events.
*
+ * @private
* @param {boolean} disabled Element is disabled
*/
OO.ui.TabIndexedElement.prototype.onDisable = function () {
--
To view, visit https://gerrit.wikimedia.org/r/193019
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie8e247d71148457531e0cfce9885ec33932d0ba1
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Kmenger <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits