mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-04-29 11:46:49 +00:00
First pass at accessibility improvements for #650
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user