yunohost-portal/middleware/a11y.global.ts
2023-08-06 16:27:24 +02:00

8 lines
201 B
TypeScript

export default defineNuxtRouteMiddleware((to) => {
if (!to.hash) {
// Auto select skip link on route change
nextTick(() => {
document.getElementById('skip-link')?.focus()
})
}
})