FIX: Make poll options tabbable (#13159)
This commit is contained in:
parent
787f989fb9
commit
8e1448487f
|
@ -58,7 +58,7 @@ createWidget("discourse-poll-option", {
|
|||
tagName: "li",
|
||||
|
||||
buildAttributes(attrs) {
|
||||
return { "data-poll-option-id": attrs.option.id };
|
||||
return { tabindex: 0, "data-poll-option-id": attrs.option.id };
|
||||
},
|
||||
|
||||
html(attrs) {
|
||||
|
@ -83,6 +83,12 @@ createWidget("discourse-poll-option", {
|
|||
this.sendWidgetAction("toggleOption", this.attrs.option);
|
||||
}
|
||||
},
|
||||
|
||||
keyDown(e) {
|
||||
if (e.keyCode === 13) {
|
||||
this.click(e);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
createWidget("discourse-poll-load-more", {
|
||||
|
|
Loading…
Reference in New Issue