From f517497fe7cc2b9aec70e2a8390ebaf67fdee39f Mon Sep 17 00:00:00 2001 From: Scott Sauyet Date: Sun, 9 Jul 2023 11:52:35 -0400 Subject: [PATCH] Add tabindex to SelectWidget and docs (#7594) --- core/modules/widgets/select.js | 4 ++++ editions/tw5.com/tiddlers/widgets/SelectWidget.tid | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/core/modules/widgets/select.js b/core/modules/widgets/select.js index cd789423f..ab9bef74e 100644 --- a/core/modules/widgets/select.js +++ b/core/modules/widgets/select.js @@ -145,6 +145,7 @@ SelectWidget.prototype.execute = function() { this.selectDefault = this.getAttribute("default"); this.selectMultiple = this.getAttribute("multiple", false); this.selectSize = this.getAttribute("size"); + this.selectTabindex = this.getAttribute("tabindex"); this.selectTooltip = this.getAttribute("tooltip"); this.selectFocus = this.getAttribute("focus"); // Make the child widgets @@ -162,6 +163,9 @@ SelectWidget.prototype.execute = function() { if(this.selectSize) { $tw.utils.addAttributeToParseTreeNode(selectNode,"size",this.selectSize); } + if(this.selectTabindex) { + $tw.utils.addAttributeToParseTreeNode(selectNode,"tabindex",this.selectTabindex); + } if(this.selectTooltip) { $tw.utils.addAttributeToParseTreeNode(selectNode,"title",this.selectTooltip); } diff --git a/editions/tw5.com/tiddlers/widgets/SelectWidget.tid b/editions/tw5.com/tiddlers/widgets/SelectWidget.tid index b46f0359f..e22fcfec6 100644 --- a/editions/tw5.com/tiddlers/widgets/SelectWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/SelectWidget.tid @@ -41,7 +41,7 @@ The content of the `<$select>` widget should be one or more HTML `