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)