mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
First pass at accessibility improvements for #650
This commit is contained in:
parent
b4ddaccd1d
commit
eeedcb6d94
@ -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
|
||||
|
20
core/language/en-GB/Toolbars.multids
Normal file
20
core/language/en-GB/Toolbars.multids
Normal file
@ -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
|
@ -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");
|
||||
|
@ -1,4 +1,4 @@
|
||||
title: $:/core/ui/EditToolbar/cancel
|
||||
tags: $:/tags/EditToolbar
|
||||
|
||||
<$button message="tw-cancel-tiddler" class="btn-invisible">{{$:/core/images/cancel-button}}</$button>
|
||||
<$button message="tw-cancel-tiddler" title={{$:/language/EditToolbar/Cancel/Hint}} aria-label={{$:/language/EditToolbar/Cancel/Caption}} class="btn-invisible">{{$:/core/images/cancel-button}}</$button>
|
@ -1,4 +1,4 @@
|
||||
title: $:/core/ui/EditToolbar/delete
|
||||
tags: $:/tags/EditToolbar
|
||||
|
||||
<$button message="tw-delete-tiddler" class="btn-invisible">{{$:/core/images/delete-button}}</$button>
|
||||
<$button message="tw-delete-tiddler" title={{$:/language/EditToolbar/Delete/Hint}} aria-label={{$:/language/EditToolbar/Delete/Caption}} class="btn-invisible">{{$:/core/images/delete-button}}</$button>
|
@ -1,4 +1,4 @@
|
||||
title: $:/core/ui/EditToolbar/save
|
||||
tags: $:/tags/EditToolbar
|
||||
|
||||
<$button message="tw-save-tiddler" class="btn-invisible">{{$:/core/images/done-button}}</$button>
|
||||
<$button message="tw-save-tiddler" title={{$:/language/EditToolbar/Save/Hint}} aria-label={{$:/language/EditToolbar/Save/Caption}} class="btn-invisible">{{$:/core/images/done-button}}</$button>
|
@ -1,4 +1,4 @@
|
||||
title: $:/core/ui/PageControls/control-panel
|
||||
tags: $:/tags/PageControls
|
||||
|
||||
<$button to="$:/ControlPanel" class="btn-invisible">{{$:/core/images/options-button}}</$button>
|
||||
<$button to="$:/ControlPanel" title={{$:/language/PageControls/ControlPanel/Hint}} aria-label={{$:/language/PageControls/ControlPanel/Caption}} class="btn-invisible">{{$:/core/images/options-button}}</$button>
|
@ -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}}</$button>
|
||||
<$button message="tw-new-tiddler" title={{$:/language/PageControls/NewTiddler/Hint}} aria-label={{$:/language/PageControls/NewTiddler/Caption}} class="btn-invisible">{{$:/core/images/new-button}}</$button>
|
@ -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}}</$button>
|
||||
<$button message="tw-save-wiki" title={{$:/language/PageControls/SaveWiki/Hint}} aria-label={{$:/language/PageControls/SaveWiki/Caption}} class="btn-invisible">{{$:/core/images/save-button}}</$button>
|
@ -1,4 +1,4 @@
|
||||
title: $:/core/ui/ViewToolbar/close
|
||||
tags: $:/tags/ViewToolbar
|
||||
|
||||
<$button message="tw-close-tiddler" class="btn-invisible">{{$:/core/images/close-button}}</$button>
|
||||
<$button message="tw-close-tiddler" title={{$:/language/ViewToolbar/Close/Hint}} aria-label={{$:/language/ViewToolbar/Close/Caption}} class="btn-invisible">{{$:/core/images/close-button}}</$button>
|
@ -1,4 +1,4 @@
|
||||
title: $:/core/ui/ViewToolbar/edit
|
||||
tags: $:/tags/ViewToolbar
|
||||
|
||||
<$button message="tw-edit-tiddler" class="btn-invisible">{{$:/core/images/edit-button}}</$button>
|
||||
<$button message="tw-edit-tiddler" title={{$:/language/ViewToolbar/Edit/Hint}} aria-label={{$:/language/ViewToolbar/Edit/Caption}} class="btn-invisible">{{$:/core/images/edit-button}}</$button>
|
@ -1,4 +1,4 @@
|
||||
title: $:/core/ui/ViewToolbar/info
|
||||
tags: $:/tags/ViewToolbar
|
||||
|
||||
<$button popup=<<tiddlerInfoState>> class="btn-invisible" selectedClass="tw-selected">{{$:/core/images/info-button}}</$button>
|
||||
<$button popup=<<tiddlerInfoState>> title={{$:/language/ViewToolbar/Info/Hint}} aria-label={{$:/language/ViewToolbar/Info/Caption}} class="btn-invisible" selectedClass="tw-selected">{{$:/core/images/info-button}}</$button>
|
@ -2,7 +2,7 @@ title: $:/core/macros/lingo
|
||||
tags: $:/tags/Macro
|
||||
|
||||
\define lingo-base()
|
||||
$:/lingo/
|
||||
$:/language/
|
||||
\end
|
||||
|
||||
\define lingo(title)
|
||||
|
Loading…
Reference in New Issue
Block a user