Calendar: timeOnly accessibility refactor

pull/2835/head
Tuğçe Küçükoğlu 2022-08-03 13:09:54 +03:00
parent cf1d6b2162
commit 50cdcfa025
1 changed files with 18 additions and 3 deletions

View File

@ -2249,9 +2249,20 @@ export default {
else
focusableElements[focusedIndex - 1].focus();
}
else {debugger;
if (focusedIndex === -1) {
if (this.timeOnly) {
focusableElements[0].focus();
}
else {
if (focusedIndex == -1)
focusableElements[focusableElements.length - 1].focus();
let spanIndex = null;
for (let i = 0; i < focusableElements.length; i++){
if (focusableElements[i].tagName === 'SPAN')
spanIndex = i;
}
focusableElements[spanIndex].focus();
}
}
else if (focusedIndex === (focusableElements.length - 1))
focusableElements[0].focus();
else
@ -2358,6 +2369,10 @@ export default {
this.overlayVisible = false;
break;
case 'Tab': {
console.log('inline')
break;
}
default:
break;
}