Calendar: timeOnly accessibility refactor
parent
cf1d6b2162
commit
50cdcfa025
|
@ -2249,9 +2249,20 @@ export default {
|
||||||
else
|
else
|
||||||
focusableElements[focusedIndex - 1].focus();
|
focusableElements[focusedIndex - 1].focus();
|
||||||
}
|
}
|
||||||
else {
|
else {debugger;
|
||||||
if (focusedIndex == -1)
|
if (focusedIndex === -1) {
|
||||||
focusableElements[focusableElements.length - 1].focus();
|
if (this.timeOnly) {
|
||||||
|
focusableElements[0].focus();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
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))
|
else if (focusedIndex === (focusableElements.length - 1))
|
||||||
focusableElements[0].focus();
|
focusableElements[0].focus();
|
||||||
else
|
else
|
||||||
|
@ -2358,6 +2369,10 @@ export default {
|
||||||
this.overlayVisible = false;
|
this.overlayVisible = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'Tab': {
|
||||||
|
console.log('inline')
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue