add Skip to main content accessibility button
This commit is contained in:
parent
1f06b5121f
commit
2ebff3328f
|
@ -1,4 +1,5 @@
|
|||
<div [class.accessibility-theme]="fontService.isLargeText()">
|
||||
<button class="skip-to-main-content" (click)="skipToMain()" tabindex="1">{{'ALT-TEXT.SKIP-TO-MAIN-CONTENT' | translate}}</button>
|
||||
<div class="wrapper" *ngIf="!showOnlyRouterOutlet">
|
||||
<app-navbar (sidebarToggled)="sidenav.toggle(); toggleNavbar($event);"></app-navbar>
|
||||
<mat-sidenav-container fullscreen class="main-container">
|
||||
|
@ -6,7 +7,7 @@
|
|||
<app-sidebar></app-sidebar>
|
||||
</mat-sidenav>
|
||||
<mat-sidenav-content class="sidenav-content">
|
||||
<div id="main-page">
|
||||
<div id="main-page" tabindex="0">
|
||||
<router-outlet (activate)='onActivate($event)' (deactivate)='onDeactivate($event)'></router-outlet>
|
||||
</div>
|
||||
</mat-sidenav-content>
|
||||
|
|
|
@ -35,3 +35,15 @@
|
|||
::ng-deep .mat-chip {
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
.skip-to-main-content {
|
||||
position: fixed;
|
||||
left: 999px;
|
||||
z-index: -1;
|
||||
&:focus, &:active {
|
||||
background-color: var(--primary-color);
|
||||
z-index: 1001;
|
||||
left: 0px;
|
||||
color: var(--primary-text);
|
||||
}
|
||||
}
|
|
@ -41,6 +41,7 @@ export class AppComponent implements OnInit, AfterViewInit {
|
|||
cssConfigLoaded = false;
|
||||
|
||||
@ViewChild('sidenav') sidenav: MatSidenav;
|
||||
@HostBinding('class.accessibility-theme') accessibilityTheme = computed(() => this.fontService.accessibleFontSignal())();
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
|
@ -263,5 +264,9 @@ export class AppComponent implements OnInit, AfterViewInit {
|
|||
toggleNavbar(event) {
|
||||
document.getElementById('hamburger').classList.toggle("change");
|
||||
}
|
||||
|
||||
skipToMain() {
|
||||
document.getElementById('main-page')?.focus();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2606,6 +2606,7 @@
|
|||
"CLOSE-RELEASE": "Close release notifications",
|
||||
"CLOSE-INTRO-CARD": "Close intro card",
|
||||
"GUIDED-TOUR-IMG": "cartoon tour pointing to text with raised arm",
|
||||
"PROGRESS-BAR": "Percentage of the form that is completed"
|
||||
"PROGRESS-BAR": "Percentage of the form that is completed",
|
||||
"SKIP-TO-MAIN-CONTENT": "Skip to main content"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2609,6 +2609,7 @@
|
|||
"CLOSE-RELEASE": "Close release notifications",
|
||||
"CLOSE-INTRO-CARD": "Close intro card",
|
||||
"GUIDED-TOUR-IMG": "cartoon tour pointing to text with raised arm",
|
||||
"PROGRESS-BAR": "Percentage of the form that is completed"
|
||||
"PROGRESS-BAR": "Percentage of the form that is completed",
|
||||
"SKIP-TO-MAIN-CONTENT": "Skip to main content"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2610,6 +2610,7 @@
|
|||
"CLOSE-RELEASE": "Close release notifications",
|
||||
"CLOSE-INTRO-CARD": "Close intro card",
|
||||
"GUIDED-TOUR-IMG": "cartoon tour pointing to text with raised arm",
|
||||
"PROGRESS-BAR": "Percentage of the form that is completed"
|
||||
"PROGRESS-BAR": "Percentage of the form that is completed",
|
||||
"SKIP-TO-MAIN-CONTENT": "Skip to main content"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2609,6 +2609,7 @@
|
|||
"CLOSE-RELEASE": "Close release notifications",
|
||||
"CLOSE-INTRO-CARD": "Close intro card",
|
||||
"GUIDED-TOUR-IMG": "cartoon tour pointing to text with raised arm",
|
||||
"PROGRESS-BAR": "Percentage of the form that is completed"
|
||||
"PROGRESS-BAR": "Percentage of the form that is completed",
|
||||
"SKIP-TO-MAIN-CONTENT": "Skip to main content"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2609,6 +2609,7 @@
|
|||
"CLOSE-RELEASE": "Close release notifications",
|
||||
"CLOSE-INTRO-CARD": "Close intro card",
|
||||
"GUIDED-TOUR-IMG": "cartoon tour pointing to text with raised arm",
|
||||
"PROGRESS-BAR": "Percentage of the form that is completed"
|
||||
"PROGRESS-BAR": "Percentage of the form that is completed",
|
||||
"SKIP-TO-MAIN-CONTENT": "Skip to main content"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2608,6 +2608,7 @@
|
|||
"CLOSE-RELEASE": "Close release notifications",
|
||||
"CLOSE-INTRO-CARD": "Close intro card",
|
||||
"GUIDED-TOUR-IMG": "cartoon tour pointing to text with raised arm",
|
||||
"PROGRESS-BAR": "Percentage of the form that is completed"
|
||||
"PROGRESS-BAR": "Percentage of the form that is completed",
|
||||
"SKIP-TO-MAIN-CONTENT": "Skip to main content"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2609,6 +2609,7 @@
|
|||
"CLOSE-RELEASE": "Close release notifications",
|
||||
"CLOSE-INTRO-CARD": "Close intro card",
|
||||
"GUIDED-TOUR-IMG": "cartoon tour pointing to text with raised arm",
|
||||
"PROGRESS-BAR": "Percentage of the form that is completed"
|
||||
"PROGRESS-BAR": "Percentage of the form that is completed",
|
||||
"SKIP-TO-MAIN-CONTENT": "Skip to main content"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2608,6 +2608,7 @@
|
|||
"CLOSE-RELEASE": "Close release notifications",
|
||||
"CLOSE-INTRO-CARD": "Close intro card",
|
||||
"GUIDED-TOUR-IMG": "cartoon tour pointing to text with raised arm",
|
||||
"PROGRESS-BAR": "Percentage of the form that is completed"
|
||||
"PROGRESS-BAR": "Percentage of the form that is completed",
|
||||
"SKIP-TO-MAIN-CONTENT": "Skip to main content"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2609,6 +2609,7 @@
|
|||
"CLOSE-RELEASE": "Close release notifications",
|
||||
"CLOSE-INTRO-CARD": "Close intro card",
|
||||
"GUIDED-TOUR-IMG": "cartoon tour pointing to text with raised arm",
|
||||
"PROGRESS-BAR": "Percentage of the form that is completed"
|
||||
"PROGRESS-BAR": "Percentage of the form that is completed",
|
||||
"SKIP-TO-MAIN-CONTENT": "Skip to main content"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2609,6 +2609,7 @@
|
|||
"CLOSE-RELEASE": "Close release notifications",
|
||||
"CLOSE-INTRO-CARD": "Close intro card",
|
||||
"GUIDED-TOUR-IMG": "cartoon tour pointing to text with raised arm",
|
||||
"PROGRESS-BAR": "Percentage of the form that is completed"
|
||||
"PROGRESS-BAR": "Percentage of the form that is completed",
|
||||
"SKIP-TO-MAIN-CONTENT": "Skip to main content"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2609,6 +2609,7 @@
|
|||
"CLOSE-RELEASE": "Close release notifications",
|
||||
"CLOSE-INTRO-CARD": "Close intro card",
|
||||
"GUIDED-TOUR-IMG": "cartoon tour pointing to text with raised arm",
|
||||
"PROGRESS-BAR": "Percentage of the form that is completed"
|
||||
"PROGRESS-BAR": "Percentage of the form that is completed",
|
||||
"SKIP-TO-MAIN-CONTENT": "Skip to main content"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue