mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 10:07:19 +00:00
Button widget: apply aria-expanded attribute when controlling a popup
Addresses (1) and (5) from #5519
This commit is contained in:
parent
e84c87ef37
commit
d56e8764a1
@ -66,6 +66,9 @@ ButtonWidget.prototype.render = function(parent,nextSibling) {
|
|||||||
if(this["aria-label"]) {
|
if(this["aria-label"]) {
|
||||||
domNode.setAttribute("aria-label",this["aria-label"]);
|
domNode.setAttribute("aria-label",this["aria-label"]);
|
||||||
}
|
}
|
||||||
|
if(this.popup || this.popupTitle) {
|
||||||
|
domNode.setAttribute("aria-expanded",isPoppedUp ? "true" : "false");
|
||||||
|
}
|
||||||
// Set the tabindex
|
// Set the tabindex
|
||||||
if(this.tabIndex) {
|
if(this.tabIndex) {
|
||||||
domNode.setAttribute("tabindex",this.tabIndex);
|
domNode.setAttribute("tabindex",this.tabIndex);
|
||||||
|
Loading…
Reference in New Issue
Block a user