Fix element type check on shortcut actions

This commit is contained in:
Jonatan Kłosko 2022-04-04 17:07:16 +02:00
parent 7bad232a86
commit a3018dc522

View file

@ -1064,17 +1064,17 @@ const Session = {
isCell(focusableId) { isCell(focusableId) {
const el = this.getFocusableEl(focusableId); const el = this.getFocusableEl(focusableId);
return el.dataset.element === "cell"; return el.hasAttribute("data-el-cell");
}, },
isSection(focusableId) { isSection(focusableId) {
const el = this.getFocusableEl(focusableId); const el = this.getFocusableEl(focusableId);
return el.dataset.element === "section-headline"; return el.hasAttribute("data-el-section-headline");
}, },
isNotebook(focusableId) { isNotebook(focusableId) {
const el = this.getFocusableEl(focusableId); const el = this.getFocusableEl(focusableId);
return el.dataset.element === "notebook-headline"; return el.hasAttribute("data-el-notebook-headline");
}, },
getFocusableEl(focusableId) { getFocusableEl(focusableId) {