[Editor] Add role=spinbutton to resizers when they're used with the keyboard

This commit is contained in:
Calixte Denizet 2023-10-04 21:30:06 +02:00
parent 40d6b0e1bf
commit 335cea22b3

View File

@ -1422,6 +1422,7 @@ class AnnotationEditor {
const boundResizerBlur = this.#resizerBlur.bind(this);
for (const div of this.#allResizerDivs) {
const name = div.getAttribute("data-resizer-name");
div.setAttribute("role", "spinbutton");
div.addEventListener("keydown", boundResizerKeydown);
div.addEventListener("blur", boundResizerBlur);
div.addEventListener("focus", this.#resizerFocus.bind(this, name));