Merge pull request #17072 from calixteman/resizer_role

[Editor] Add role=spinbutton to resizers when they're used with the keyboard
This commit is contained in:
calixteman 2023-10-04 23:13:44 +02:00 committed by GitHub
commit 66c3b239ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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));