Added skip to main content button

This commit is contained in:
Alexandre Vryghem
2023-11-08 23:43:17 +01:00
parent 404ccd9b0e
commit c4205163f9
6 changed files with 33 additions and 3 deletions

View File

@@ -78,4 +78,12 @@ export class RootComponent implements OnInit {
this.shouldShowRouteLoader = false;
}
}
skipToMainContent() {
const mainContent = document.getElementById('main-content');
if (mainContent) {
mainContent.tabIndex = -1;
mainContent.focus();
}
}
}