From eeedcb6d94a25d02e8fec45c89b30c7f2bcdde73 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Sat, 14 Jun 2014 18:06:56 +0100 Subject: [PATCH 01/10] First pass at accessibility improvements for #650 --- core/language/en-GB/Fields.multids | 1 + core/language/en-GB/Toolbars.multids | 20 ++++++++++++++++++++ core/modules/widgets/button.js | 10 +++++++++- core/ui/EditToolbar/cancel.tid | 2 +- core/ui/EditToolbar/delete.tid | 2 +- core/ui/EditToolbar/save.tid | 2 +- core/ui/PageControls/controlpanel.tid | 2 +- core/ui/PageControls/newtiddler.tid | 2 +- core/ui/PageControls/savewiki.tid | 2 +- core/ui/ViewToolbar/close.tid | 2 +- core/ui/ViewToolbar/edit.tid | 2 +- core/ui/ViewToolbar/info.tid | 2 +- core/wiki/macros/lingo.tid | 2 +- 13 files changed, 40 insertions(+), 11 deletions(-) create mode 100644 core/language/en-GB/Toolbars.multids diff --git a/core/language/en-GB/Fields.multids b/core/language/en-GB/Fields.multids index c84dd2884..683e745e6 100644 --- a/core/language/en-GB/Fields.multids +++ b/core/language/en-GB/Fields.multids @@ -1,5 +1,6 @@ title: $:/language/Docs/Fields/ +_canonical_uri: The full URI of an external image tiddler bag: The name of the bag from which a tiddler came caption: The text to be displayed on a tab or button color: The CSS color value associated with a tiddler diff --git a/core/language/en-GB/Toolbars.multids b/core/language/en-GB/Toolbars.multids new file mode 100644 index 000000000..710c8e1e4 --- /dev/null +++ b/core/language/en-GB/Toolbars.multids @@ -0,0 +1,20 @@ +title: $:/language/ + +EditToolbar/Delete/Caption: delete +EditToolbar/Delete/Hint: Delete this tiddler +EditToolbar/Cancel/Caption: cancel +EditToolbar/Cancel/Hint: Cancel editing this tiddler +EditToolbar/Save/Caption: save +EditToolbar/Save/Hint: Save this tiddler +ViewToolbar/Info/Caption: info +ViewToolbar/Info/Hint: Show information for this tiddler +ViewToolbar/Edit/Caption: edit +ViewToolbar/Edit/Hint: Edit this tiddler +ViewToolbar/Close/Caption: close +ViewToolbar/Close/Hint: Close this tiddler +PageControls/NewTiddler/Caption: new tiddler +PageControls/NewTiddler/Hint: Create a new tiddler +PageControls/ControlPanel/Caption: control panel +PageControls/ControlPanel/Hint: Open control panel +PageControls/SaveWiki/Caption: save changes +PageControls/SaveWiki/Hint: Save changes diff --git a/core/modules/widgets/button.js b/core/modules/widgets/button.js index b77721cdb..cfe05a8c0 100644 --- a/core/modules/widgets/button.js +++ b/core/modules/widgets/button.js @@ -46,10 +46,16 @@ ButtonWidget.prototype.render = function(parent,nextSibling) { } } domNode.className = classes.join(" "); - // Assign classes + // Assign other attributes if(this.style) { domNode.setAttribute("style",this.style); } + if(this.title) { + domNode.setAttribute("title",this.title); + } + if(this["aria-label"]) { + domNode.setAttribute("aria-label",this["aria-label"]); + } // Add a click event handler domNode.addEventListener("click",function (event) { var handled = false; @@ -134,6 +140,8 @@ ButtonWidget.prototype.execute = function() { this.popup = this.getAttribute("popup"); this.hover = this.getAttribute("hover"); this["class"] = this.getAttribute("class",""); + this["aria-label"] = this.getAttribute("aria-label"); + this.title = this.getAttribute("title"); this.style = this.getAttribute("style"); this.selectedClass = this.getAttribute("selectedClass"); this.defaultSetValue = this.getAttribute("default"); diff --git a/core/ui/EditToolbar/cancel.tid b/core/ui/EditToolbar/cancel.tid index 7f09ee774..e3aee1bdf 100644 --- a/core/ui/EditToolbar/cancel.tid +++ b/core/ui/EditToolbar/cancel.tid @@ -1,4 +1,4 @@ title: $:/core/ui/EditToolbar/cancel tags: $:/tags/EditToolbar -<$button message="tw-cancel-tiddler" class="btn-invisible">{{$:/core/images/cancel-button}} \ No newline at end of file +<$button message="tw-cancel-tiddler" title={{$:/language/EditToolbar/Cancel/Hint}} aria-label={{$:/language/EditToolbar/Cancel/Caption}} class="btn-invisible">{{$:/core/images/cancel-button}} \ No newline at end of file diff --git a/core/ui/EditToolbar/delete.tid b/core/ui/EditToolbar/delete.tid index 66cde605d..0f3a82ee8 100644 --- a/core/ui/EditToolbar/delete.tid +++ b/core/ui/EditToolbar/delete.tid @@ -1,4 +1,4 @@ title: $:/core/ui/EditToolbar/delete tags: $:/tags/EditToolbar -<$button message="tw-delete-tiddler" class="btn-invisible">{{$:/core/images/delete-button}} \ No newline at end of file +<$button message="tw-delete-tiddler" title={{$:/language/EditToolbar/Delete/Hint}} aria-label={{$:/language/EditToolbar/Delete/Caption}} class="btn-invisible">{{$:/core/images/delete-button}} \ No newline at end of file diff --git a/core/ui/EditToolbar/save.tid b/core/ui/EditToolbar/save.tid index 4e21cefec..53e73e1b2 100644 --- a/core/ui/EditToolbar/save.tid +++ b/core/ui/EditToolbar/save.tid @@ -1,4 +1,4 @@ title: $:/core/ui/EditToolbar/save tags: $:/tags/EditToolbar -<$button message="tw-save-tiddler" class="btn-invisible">{{$:/core/images/done-button}} \ No newline at end of file +<$button message="tw-save-tiddler" title={{$:/language/EditToolbar/Save/Hint}} aria-label={{$:/language/EditToolbar/Save/Caption}} class="btn-invisible">{{$:/core/images/done-button}} \ No newline at end of file diff --git a/core/ui/PageControls/controlpanel.tid b/core/ui/PageControls/controlpanel.tid index 0c96c5bfe..dbf480390 100644 --- a/core/ui/PageControls/controlpanel.tid +++ b/core/ui/PageControls/controlpanel.tid @@ -1,4 +1,4 @@ title: $:/core/ui/PageControls/control-panel tags: $:/tags/PageControls -<$button to="$:/ControlPanel" class="btn-invisible">{{$:/core/images/options-button}} \ No newline at end of file +<$button to="$:/ControlPanel" title={{$:/language/PageControls/ControlPanel/Hint}} aria-label={{$:/language/PageControls/ControlPanel/Caption}} class="btn-invisible">{{$:/core/images/options-button}} \ No newline at end of file diff --git a/core/ui/PageControls/newtiddler.tid b/core/ui/PageControls/newtiddler.tid index 27ca47001..a8bd49153 100644 --- a/core/ui/PageControls/newtiddler.tid +++ b/core/ui/PageControls/newtiddler.tid @@ -1,4 +1,4 @@ title: $:/core/ui/PageControls/new-tiddler tags: $:/tags/PageControls -<$button message="tw-new-tiddler" class="btn-invisible">{{$:/core/images/new-button}} \ No newline at end of file +<$button message="tw-new-tiddler" title={{$:/language/PageControls/NewTiddler/Hint}} aria-label={{$:/language/PageControls/NewTiddler/Caption}} class="btn-invisible">{{$:/core/images/new-button}} \ No newline at end of file diff --git a/core/ui/PageControls/savewiki.tid b/core/ui/PageControls/savewiki.tid index d855483ff..e5aac6bd2 100644 --- a/core/ui/PageControls/savewiki.tid +++ b/core/ui/PageControls/savewiki.tid @@ -1,4 +1,4 @@ title: $:/core/ui/PageControls/save-wiki tags: $:/tags/PageControls -<$button message="tw-save-wiki" class="btn-invisible">{{$:/core/images/save-button}} \ No newline at end of file +<$button message="tw-save-wiki" title={{$:/language/PageControls/SaveWiki/Hint}} aria-label={{$:/language/PageControls/SaveWiki/Caption}} class="btn-invisible">{{$:/core/images/save-button}} \ No newline at end of file diff --git a/core/ui/ViewToolbar/close.tid b/core/ui/ViewToolbar/close.tid index 7c58b126e..28633ff87 100644 --- a/core/ui/ViewToolbar/close.tid +++ b/core/ui/ViewToolbar/close.tid @@ -1,4 +1,4 @@ title: $:/core/ui/ViewToolbar/close tags: $:/tags/ViewToolbar -<$button message="tw-close-tiddler" class="btn-invisible">{{$:/core/images/close-button}} \ No newline at end of file +<$button message="tw-close-tiddler" title={{$:/language/ViewToolbar/Close/Hint}} aria-label={{$:/language/ViewToolbar/Close/Caption}} class="btn-invisible">{{$:/core/images/close-button}} \ No newline at end of file diff --git a/core/ui/ViewToolbar/edit.tid b/core/ui/ViewToolbar/edit.tid index e2efb1884..9b910af46 100644 --- a/core/ui/ViewToolbar/edit.tid +++ b/core/ui/ViewToolbar/edit.tid @@ -1,4 +1,4 @@ title: $:/core/ui/ViewToolbar/edit tags: $:/tags/ViewToolbar -<$button message="tw-edit-tiddler" class="btn-invisible">{{$:/core/images/edit-button}} \ No newline at end of file +<$button message="tw-edit-tiddler" title={{$:/language/ViewToolbar/Edit/Hint}} aria-label={{$:/language/ViewToolbar/Edit/Caption}} class="btn-invisible">{{$:/core/images/edit-button}} \ No newline at end of file diff --git a/core/ui/ViewToolbar/info.tid b/core/ui/ViewToolbar/info.tid index d22c2761f..dc348c31e 100644 --- a/core/ui/ViewToolbar/info.tid +++ b/core/ui/ViewToolbar/info.tid @@ -1,4 +1,4 @@ title: $:/core/ui/ViewToolbar/info tags: $:/tags/ViewToolbar -<$button popup=<> class="btn-invisible" selectedClass="tw-selected">{{$:/core/images/info-button}} \ No newline at end of file +<$button popup=<> title={{$:/language/ViewToolbar/Info/Hint}} aria-label={{$:/language/ViewToolbar/Info/Caption}} class="btn-invisible" selectedClass="tw-selected">{{$:/core/images/info-button}} \ No newline at end of file diff --git a/core/wiki/macros/lingo.tid b/core/wiki/macros/lingo.tid index 3c761cf01..fc2e60ebc 100644 --- a/core/wiki/macros/lingo.tid +++ b/core/wiki/macros/lingo.tid @@ -2,7 +2,7 @@ title: $:/core/macros/lingo tags: $:/tags/Macro \define lingo-base() -$:/lingo/ +$:/language/ \end \define lingo(title) From bf2f88ba8bd91260a31f6da5ae11e8b5ec76b3bd Mon Sep 17 00:00:00 2001 From: Jermolene Date: Sun, 15 Jun 2014 08:37:58 +0100 Subject: [PATCH 02/10] Use H1 for tiddler titles Part of #650 --- core/ui/ViewTemplate/title.tid | 4 ++-- themes/tiddlywiki/vanilla/base.tid | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/ui/ViewTemplate/title.tid b/core/ui/ViewTemplate/title.tid index 1b49c8661..75a31c4f9 100644 --- a/core/ui/ViewTemplate/title.tid +++ b/core/ui/ViewTemplate/title.tid @@ -5,7 +5,7 @@ tags: $:/tags/ViewTemplate fill:$(foregroundColor)$; \end
-
+

<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]]" variable="listItem"><$transclude tiddler=<>/> @@ -24,7 +24,7 @@ fill:$(foregroundColor)$; <$view field="title"/> -

+ <$reveal type="nomatch" text="" default="" state=<> class="tw-tiddler-info tw-popup" animate="yes" retain="yes"> diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid index da0b4af79..db27856c0 100644 --- a/themes/tiddlywiki/vanilla/base.tid +++ b/themes/tiddlywiki/vanilla/base.tid @@ -570,6 +570,7 @@ a.tw-tiddlylink-external:hover { font-size: 2.35em; line-height: 1.2em; color: <>; + margin: 0; } .tw-system-title-prefix { From bc9b67cbc3f363d48aafea86c077fcd5a9c0ca64 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Mon, 16 Jun 2014 17:34:20 +0100 Subject: [PATCH 03/10] Use H1 for page title and H2 for tiddler titles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ideally, we’d also rebase the headings within tiddlers so that `! Heading` would be an H3. Hopefully we’ll do that later. --- core/ui/PageTemplate/sidebar.tid | 4 ++-- core/ui/ViewTemplate/title.tid | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/ui/PageTemplate/sidebar.tid b/core/ui/PageTemplate/sidebar.tid index e9f4727a6..6e7351728 100644 --- a/core/ui/PageTemplate/sidebar.tid +++ b/core/ui/PageTemplate/sidebar.tid @@ -7,11 +7,11 @@ tags: $:/tags/PageTemplate <$reveal state="$:/state/sidebar" type="match" text="yes" default="yes" retain="yes"> -
+

<$transclude tiddler="$:/SiteTitle" mode="inline"/> -

+
diff --git a/core/ui/ViewTemplate/title.tid b/core/ui/ViewTemplate/title.tid index 75a31c4f9..2193f8deb 100644 --- a/core/ui/ViewTemplate/title.tid +++ b/core/ui/ViewTemplate/title.tid @@ -5,7 +5,7 @@ tags: $:/tags/ViewTemplate fill:$(foregroundColor)$; \end
-

+

<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]]" variable="listItem"><$transclude tiddler=<>/> @@ -24,7 +24,7 @@ fill:$(foregroundColor)$; <$view field="title"/> -

+ <$reveal type="nomatch" text="" default="" state=<> class="tw-tiddler-info tw-popup" animate="yes" retain="yes"> From 401349a1d64aefd025709510ea5927d855fc4a58 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Mon, 16 Jun 2014 17:40:38 +0100 Subject: [PATCH 04/10] Improve a11y of close buttons in open tab a11y === accessibility --- core/ui/SideBar/Open.tid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/ui/SideBar/Open.tid b/core/ui/SideBar/Open.tid index 000d850c2..78895f894 100644 --- a/core/ui/SideBar/Open.tid +++ b/core/ui/SideBar/Open.tid @@ -5,7 +5,7 @@ caption: {{$:/language/SideBar/Open/Caption}} \define lingo-base() $:/language/CloseAll/ <$list filter="[list[$:/StoryList]]" history="$:/HistoryList" storyview="pop"> -<$button message="tw-close-tiddler" class="btn-invisible btn-mini">× <$link to={{!!title}}><$view field="title"/> +<$button message="tw-close-tiddler" title={{$:/language/ViewToolbar/Close/Hint}} aria-label={{$:/language/ViewToolbar/Close/Caption}} class="btn-invisible btn-mini">× <$link to={{!!title}}><$view field="title"/> From 06b0f9adb7209870b46d42f832c1f7ad7a78976f Mon Sep 17 00:00:00 2001 From: Jermolene Date: Tue, 17 Jun 2014 07:54:10 +0100 Subject: [PATCH 05/10] Added aria-label attribute to link widget And document it for the button widget --- core/modules/widgets/link.js | 8 ++++++-- editions/tw5.com/tiddlers/widgets/ButtonWidget.tid | 3 ++- editions/tw5.com/tiddlers/widgets/LinkWidget.tid | 3 +++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/core/modules/widgets/link.js b/core/modules/widgets/link.js index 3885ea08f..111896219 100755 --- a/core/modules/widgets/link.js +++ b/core/modules/widgets/link.js @@ -87,6 +87,9 @@ LinkWidget.prototype.renderLink = function(parent,nextSibling) { }); domNode.setAttribute("title",tooltipText); } + if(this["aria-label"]) { + domNode.setAttribute("aria-label",this["aria-label"]); + } // Add a click event handler $tw.utils.addEventListeners(domNode,[ {name: "click", handlerObject: this, handlerMethod: "handleClickEvent"}, @@ -176,8 +179,9 @@ Compute the internal state of the widget LinkWidget.prototype.execute = function() { // Get the target tiddler title this.to = this.getAttribute("to",this.getVariable("currentTiddler")); - // Get the link title + // Get the link title and aria label this.tooltip = this.getAttribute("tooltip"); + this["aria-label"] = this.getAttribute("aria-label"); // Determine the link characteristics this.isMissing = !this.wiki.tiddlerExists(this.to); this.isShadow = this.wiki.isShadowTiddler(this.to); @@ -190,7 +194,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of */ LinkWidget.prototype.refresh = function(changedTiddlers) { var changedAttributes = this.computeAttributes(); - if(changedAttributes.to || changedTiddlers[this.to] || changedAttributes.tooltip) { + if(changedAttributes.to || changedTiddlers[this.to] || changedAttributes["aria-label"] || changedAttributes.tooltip) { this.refreshSelf(); return true; } diff --git a/editions/tw5.com/tiddlers/widgets/ButtonWidget.tid b/editions/tw5.com/tiddlers/widgets/ButtonWidget.tid index 6000fa407..17522113e 100644 --- a/editions/tw5.com/tiddlers/widgets/ButtonWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/ButtonWidget.tid @@ -1,6 +1,6 @@ title: ButtonWidget created: 201310241419 -modified: 201403150837 +modified: 201406170837 tags: widget ! Introduction @@ -23,6 +23,7 @@ The content of the `<$button>` widget is displayed within the button. |set |A TextReference to which a new value will be assigned | |setTo |The new value to assign to the TextReference identified in the `set` attribute | |popup |Title of a state tiddler for a popup that is toggled when the button is clicked | +|aria-label |Optional [[Accessibility]] label | |class |An optional CSS class name to be assigned to the HTML element | |style |An optional CSS style attribute to be assigned to the HTML element | |selectedClass |An optional additional CSS class to be assigned if the popup is triggered or the tiddler specified in `set` already has the value specified in `setTo` | diff --git a/editions/tw5.com/tiddlers/widgets/LinkWidget.tid b/editions/tw5.com/tiddlers/widgets/LinkWidget.tid index efc71052c..f67d44520 100644 --- a/editions/tw5.com/tiddlers/widgets/LinkWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/LinkWidget.tid @@ -1,4 +1,6 @@ title: LinkWidget +created: 201310241419 +modified: 201406170837 tags: widget The `link` widget generates links to tiddlers. @@ -7,6 +9,7 @@ The `link` widget generates links to tiddlers. |!Attribute |!Description | |to |The title of the target tiddler for the link (defaults to the [[WidgetVariable: currentTiddler]]) | +|aria-label |Optional [[Accessibility]] label | |tooltip |Optional tooltip WikiText | The content of the link widget is rendered within the `` tag. From 325a93f3c31d7094a3a1ad6363d7bb2d0a1b59d3 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Tue, 17 Jun 2014 07:56:13 +0100 Subject: [PATCH 06/10] Move button language to $:/language/Buttons --- core/language/en-GB/Buttons.multids | 22 ++++++++++++++++++++++ core/language/en-GB/Toolbars.multids | 20 -------------------- core/ui/EditToolbar/cancel.tid | 2 +- core/ui/EditToolbar/delete.tid | 2 +- core/ui/EditToolbar/save.tid | 2 +- core/ui/PageControls/controlpanel.tid | 2 +- core/ui/PageControls/newtiddler.tid | 2 +- core/ui/PageControls/savewiki.tid | 2 +- core/ui/ViewToolbar/close.tid | 2 +- core/ui/ViewToolbar/edit.tid | 2 +- core/ui/ViewToolbar/info.tid | 2 +- 11 files changed, 31 insertions(+), 29 deletions(-) create mode 100644 core/language/en-GB/Buttons.multids delete mode 100644 core/language/en-GB/Toolbars.multids diff --git a/core/language/en-GB/Buttons.multids b/core/language/en-GB/Buttons.multids new file mode 100644 index 000000000..39adfe081 --- /dev/null +++ b/core/language/en-GB/Buttons.multids @@ -0,0 +1,22 @@ +title: $:/language/Buttons/ + +AdvancedSearch/Caption: advanced search +AdvancedSearch/Hint: Advanced search +Cancel/Caption: cancel +Cancel/Hint: Cancel editing this tiddler +Close/Caption: close +Close/Hint: Close this tiddler +ControlPanel/Caption: control panel +ControlPanel/Hint: Open control panel +Delete/Caption: delete +Delete/Hint: Delete this tiddler +Edit/Caption: edit +Edit/Hint: Edit this tiddler +Info/Caption: info +Info/Hint: Show information for this tiddler +NewTiddler/Caption: new tiddler +NewTiddler/Hint: Create a new tiddler +Save/Caption: save +Save/Hint: Save this tiddler +SaveWiki/Caption: save changes +SaveWiki/Hint: Save changes diff --git a/core/language/en-GB/Toolbars.multids b/core/language/en-GB/Toolbars.multids deleted file mode 100644 index 710c8e1e4..000000000 --- a/core/language/en-GB/Toolbars.multids +++ /dev/null @@ -1,20 +0,0 @@ -title: $:/language/ - -EditToolbar/Delete/Caption: delete -EditToolbar/Delete/Hint: Delete this tiddler -EditToolbar/Cancel/Caption: cancel -EditToolbar/Cancel/Hint: Cancel editing this tiddler -EditToolbar/Save/Caption: save -EditToolbar/Save/Hint: Save this tiddler -ViewToolbar/Info/Caption: info -ViewToolbar/Info/Hint: Show information for this tiddler -ViewToolbar/Edit/Caption: edit -ViewToolbar/Edit/Hint: Edit this tiddler -ViewToolbar/Close/Caption: close -ViewToolbar/Close/Hint: Close this tiddler -PageControls/NewTiddler/Caption: new tiddler -PageControls/NewTiddler/Hint: Create a new tiddler -PageControls/ControlPanel/Caption: control panel -PageControls/ControlPanel/Hint: Open control panel -PageControls/SaveWiki/Caption: save changes -PageControls/SaveWiki/Hint: Save changes diff --git a/core/ui/EditToolbar/cancel.tid b/core/ui/EditToolbar/cancel.tid index e3aee1bdf..b271f158e 100644 --- a/core/ui/EditToolbar/cancel.tid +++ b/core/ui/EditToolbar/cancel.tid @@ -1,4 +1,4 @@ title: $:/core/ui/EditToolbar/cancel tags: $:/tags/EditToolbar -<$button message="tw-cancel-tiddler" title={{$:/language/EditToolbar/Cancel/Hint}} aria-label={{$:/language/EditToolbar/Cancel/Caption}} class="btn-invisible">{{$:/core/images/cancel-button}} \ No newline at end of file +<$button message="tw-cancel-tiddler" title={{$:/language/Buttons/Cancel/Hint}} aria-label={{$:/language/Buttons/Cancel/Caption}} class="btn-invisible">{{$:/core/images/cancel-button}} \ No newline at end of file diff --git a/core/ui/EditToolbar/delete.tid b/core/ui/EditToolbar/delete.tid index 0f3a82ee8..a8f5881d4 100644 --- a/core/ui/EditToolbar/delete.tid +++ b/core/ui/EditToolbar/delete.tid @@ -1,4 +1,4 @@ title: $:/core/ui/EditToolbar/delete tags: $:/tags/EditToolbar -<$button message="tw-delete-tiddler" title={{$:/language/EditToolbar/Delete/Hint}} aria-label={{$:/language/EditToolbar/Delete/Caption}} class="btn-invisible">{{$:/core/images/delete-button}} \ No newline at end of file +<$button message="tw-delete-tiddler" title={{$:/language/Buttons/Delete/Hint}} aria-label={{$:/language/Buttons/Delete/Caption}} class="btn-invisible">{{$:/core/images/delete-button}} \ No newline at end of file diff --git a/core/ui/EditToolbar/save.tid b/core/ui/EditToolbar/save.tid index 53e73e1b2..fcd40d461 100644 --- a/core/ui/EditToolbar/save.tid +++ b/core/ui/EditToolbar/save.tid @@ -1,4 +1,4 @@ title: $:/core/ui/EditToolbar/save tags: $:/tags/EditToolbar -<$button message="tw-save-tiddler" title={{$:/language/EditToolbar/Save/Hint}} aria-label={{$:/language/EditToolbar/Save/Caption}} class="btn-invisible">{{$:/core/images/done-button}} \ No newline at end of file +<$button message="tw-save-tiddler" title={{$:/language/Buttons/Save/Hint}} aria-label={{$:/language/Buttons/Save/Caption}} class="btn-invisible">{{$:/core/images/done-button}} \ No newline at end of file diff --git a/core/ui/PageControls/controlpanel.tid b/core/ui/PageControls/controlpanel.tid index dbf480390..b0ca856e4 100644 --- a/core/ui/PageControls/controlpanel.tid +++ b/core/ui/PageControls/controlpanel.tid @@ -1,4 +1,4 @@ title: $:/core/ui/PageControls/control-panel tags: $:/tags/PageControls -<$button to="$:/ControlPanel" title={{$:/language/PageControls/ControlPanel/Hint}} aria-label={{$:/language/PageControls/ControlPanel/Caption}} class="btn-invisible">{{$:/core/images/options-button}} \ No newline at end of file +<$button to="$:/ControlPanel" title={{$:/language/Buttons/ControlPanel/Hint}} aria-label={{$:/language/Buttons/ControlPanel/Caption}} class="btn-invisible">{{$:/core/images/options-button}} \ No newline at end of file diff --git a/core/ui/PageControls/newtiddler.tid b/core/ui/PageControls/newtiddler.tid index a8bd49153..576bdc7ad 100644 --- a/core/ui/PageControls/newtiddler.tid +++ b/core/ui/PageControls/newtiddler.tid @@ -1,4 +1,4 @@ title: $:/core/ui/PageControls/new-tiddler tags: $:/tags/PageControls -<$button message="tw-new-tiddler" title={{$:/language/PageControls/NewTiddler/Hint}} aria-label={{$:/language/PageControls/NewTiddler/Caption}} class="btn-invisible">{{$:/core/images/new-button}} \ No newline at end of file +<$button message="tw-new-tiddler" title={{$:/language/Buttons/NewTiddler/Hint}} aria-label={{$:/language/Buttons/NewTiddler/Caption}} class="btn-invisible">{{$:/core/images/new-button}} \ No newline at end of file diff --git a/core/ui/PageControls/savewiki.tid b/core/ui/PageControls/savewiki.tid index e5aac6bd2..5e1285c54 100644 --- a/core/ui/PageControls/savewiki.tid +++ b/core/ui/PageControls/savewiki.tid @@ -1,4 +1,4 @@ title: $:/core/ui/PageControls/save-wiki tags: $:/tags/PageControls -<$button message="tw-save-wiki" title={{$:/language/PageControls/SaveWiki/Hint}} aria-label={{$:/language/PageControls/SaveWiki/Caption}} class="btn-invisible">{{$:/core/images/save-button}} \ No newline at end of file +<$button message="tw-save-wiki" title={{$:/language/Buttons/SaveWiki/Hint}} aria-label={{$:/language/Buttons/SaveWiki/Caption}} class="btn-invisible">{{$:/core/images/save-button}} \ No newline at end of file diff --git a/core/ui/ViewToolbar/close.tid b/core/ui/ViewToolbar/close.tid index 28633ff87..92a9c163f 100644 --- a/core/ui/ViewToolbar/close.tid +++ b/core/ui/ViewToolbar/close.tid @@ -1,4 +1,4 @@ title: $:/core/ui/ViewToolbar/close tags: $:/tags/ViewToolbar -<$button message="tw-close-tiddler" title={{$:/language/ViewToolbar/Close/Hint}} aria-label={{$:/language/ViewToolbar/Close/Caption}} class="btn-invisible">{{$:/core/images/close-button}} \ No newline at end of file +<$button message="tw-close-tiddler" title={{$:/language/Buttons/Close/Hint}} aria-label={{$:/language/Buttons/Close/Caption}} class="btn-invisible">{{$:/core/images/close-button}} \ No newline at end of file diff --git a/core/ui/ViewToolbar/edit.tid b/core/ui/ViewToolbar/edit.tid index 9b910af46..ac398358a 100644 --- a/core/ui/ViewToolbar/edit.tid +++ b/core/ui/ViewToolbar/edit.tid @@ -1,4 +1,4 @@ title: $:/core/ui/ViewToolbar/edit tags: $:/tags/ViewToolbar -<$button message="tw-edit-tiddler" title={{$:/language/ViewToolbar/Edit/Hint}} aria-label={{$:/language/ViewToolbar/Edit/Caption}} class="btn-invisible">{{$:/core/images/edit-button}} \ No newline at end of file +<$button message="tw-edit-tiddler" title={{$:/language/Buttons/Edit/Hint}} aria-label={{$:/language/Buttons/Edit/Caption}} class="btn-invisible">{{$:/core/images/edit-button}} \ No newline at end of file diff --git a/core/ui/ViewToolbar/info.tid b/core/ui/ViewToolbar/info.tid index dc348c31e..2fc1c8ab8 100644 --- a/core/ui/ViewToolbar/info.tid +++ b/core/ui/ViewToolbar/info.tid @@ -1,4 +1,4 @@ title: $:/core/ui/ViewToolbar/info tags: $:/tags/ViewToolbar -<$button popup=<> title={{$:/language/ViewToolbar/Info/Hint}} aria-label={{$:/language/ViewToolbar/Info/Caption}} class="btn-invisible" selectedClass="tw-selected">{{$:/core/images/info-button}} \ No newline at end of file +<$button popup=<> title={{$:/language/Buttons/Info/Hint}} aria-label={{$:/language/Buttons/Info/Caption}} class="btn-invisible" selectedClass="tw-selected">{{$:/core/images/info-button}} \ No newline at end of file From 6f859c8d447a477a9120bdc308d1524558a80f20 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Tue, 17 Jun 2014 07:56:27 +0100 Subject: [PATCH 07/10] Add label for close button in open sidebar tab --- core/ui/SideBar/Open.tid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/ui/SideBar/Open.tid b/core/ui/SideBar/Open.tid index 78895f894..4c4a7e0ce 100644 --- a/core/ui/SideBar/Open.tid +++ b/core/ui/SideBar/Open.tid @@ -5,7 +5,7 @@ caption: {{$:/language/SideBar/Open/Caption}} \define lingo-base() $:/language/CloseAll/ <$list filter="[list[$:/StoryList]]" history="$:/HistoryList" storyview="pop"> -<$button message="tw-close-tiddler" title={{$:/language/ViewToolbar/Close/Hint}} aria-label={{$:/language/ViewToolbar/Close/Caption}} class="btn-invisible btn-mini">× <$link to={{!!title}}><$view field="title"/> +<$button message="tw-close-tiddler" title={{$:/language/Buttons/Close/Hint}} aria-label={{$:/language/Buttons/Close/Caption}} class="btn-invisible btn-mini">× <$link to={{!!title}}><$view field="title"/> From 346b2f86111815c746c993fa09b7f677fa0b4b37 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Tue, 17 Jun 2014 07:56:36 +0100 Subject: [PATCH 08/10] Add label for advanced search link --- core/ui/SideBarLists.tid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/ui/SideBarLists.tid b/core/ui/SideBarLists.tid index 2f5891bc0..79ff61241 100644 --- a/core/ui/SideBarLists.tid +++ b/core/ui/SideBarLists.tid @@ -8,7 +8,7 @@ title: $:/core/ui/SideBarLists <$link to="" class="btn-invisible">{{$:/core/images/close-button}} - <$reveal state="$:/temp/search" type="match" text=""> <$link to="$:/AdvancedSearch" class="btn-invisible">… + <$reveal state="$:/temp/search" type="match" text=""> <$link to="$:/AdvancedSearch" tooltip={{$:/language/Buttons/AdvancedSearch/Hint}} aria-label={{$:/language/Buttons/AdvancedSearch/Caption}} class="btn-invisible">…
<$reveal state="$:/temp/search" type="nomatch" text=""> From 617963bd883871977e5c0408f38bf55ce0faffb0 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Tue, 17 Jun 2014 10:49:13 +0100 Subject: [PATCH 09/10] Update button widget docs --- editions/tw5.com/tiddlers/widgets/ButtonWidget.tid | 1 + 1 file changed, 1 insertion(+) diff --git a/editions/tw5.com/tiddlers/widgets/ButtonWidget.tid b/editions/tw5.com/tiddlers/widgets/ButtonWidget.tid index 17522113e..682c98ea2 100644 --- a/editions/tw5.com/tiddlers/widgets/ButtonWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/ButtonWidget.tid @@ -24,6 +24,7 @@ The content of the `<$button>` widget is displayed within the button. |setTo |The new value to assign to the TextReference identified in the `set` attribute | |popup |Title of a state tiddler for a popup that is toggled when the button is clicked | |aria-label |Optional [[Accessibility]] label | +|title |Optional tooltip | |class |An optional CSS class name to be assigned to the HTML element | |style |An optional CSS style attribute to be assigned to the HTML element | |selectedClass |An optional additional CSS class to be assigned if the popup is triggered or the tiddler specified in `set` already has the value specified in `setTo` | From 34e4166dc5f24519b000de66853d5b1aee8f1648 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Tue, 17 Jun 2014 11:39:18 +0100 Subject: [PATCH 10/10] Add label and title for show/hide sidebar buttons More fixes for #650 --- core/language/en-GB/Buttons.multids | 4 ++++ core/ui/TopRightBar/menu.tid | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/core/language/en-GB/Buttons.multids b/core/language/en-GB/Buttons.multids index 39adfe081..cba6e054f 100644 --- a/core/language/en-GB/Buttons.multids +++ b/core/language/en-GB/Buttons.multids @@ -20,3 +20,7 @@ Save/Caption: save Save/Hint: Save this tiddler SaveWiki/Caption: save changes SaveWiki/Hint: Save changes +HideSideBar/Caption: hide sidebar +HideSideBar/Hint: Hide sidebar +ShowSideBar/Caption: show sidebar +ShowSideBar/Hint: Show sidebar diff --git a/core/ui/TopRightBar/menu.tid b/core/ui/TopRightBar/menu.tid index 324ba9190..2ce068e9b 100644 --- a/core/ui/TopRightBar/menu.tid +++ b/core/ui/TopRightBar/menu.tid @@ -2,8 +2,8 @@ title: $:/core/ui/TopBar/menu tags: $:/tags/TopRightBar <$reveal state="$:/state/sidebar" type="nomatch" text="no"> -<$button set="$:/state/sidebar" setTo="no" class="btn-invisible">{{$:/core/images/chevron-right}} +<$button set="$:/state/sidebar" setTo="no" title={{$:/language/Buttons/HideSideBar/Hint}} aria-label={{$:/language/Buttons/HideSideBar/Caption}} class="btn-invisible">{{$:/core/images/chevron-right}} <$reveal state="$:/state/sidebar" type="match" text="no"> -<$button set="$:/state/sidebar" setTo="yes" class="btn-invisible">{{$:/core/images/chevron-left}} +<$button set="$:/state/sidebar" setTo="yes" title={{$:/language/Buttons/ShowSideBar/Hint}} aria-label={{$:/language/Buttons/ShowSideBar/Caption}} class="btn-invisible">{{$:/core/images/chevron-left}}