diff --git a/shared/editor/nodes/CheckboxItem.ts b/shared/editor/nodes/CheckboxItem.ts index 8724b768b..f7c03ff15 100644 --- a/shared/editor/nodes/CheckboxItem.ts +++ b/shared/editor/nodes/CheckboxItem.ts @@ -36,7 +36,7 @@ export default class CheckboxItem extends Node { const input = document.createElement("span"); input.tabIndex = -1; input.className = "checkbox"; - input.ariaChecked = node.attrs.checked.toString(); + input.setAttribute("aria-checked", node.attrs.checked.toString()); input.setAttribute("role", "checkbox"); input.addEventListener("click", this.handleClick); @@ -75,7 +75,7 @@ export default class CheckboxItem extends Node { if (result) { const transaction = tr.setNodeMarkup(result.inside, undefined, { - checked: event.target.ariaChecked !== "true", + checked: event.target.getAttribute("aria-checked") !== "true", }); view.dispatch(transaction); }