Add global skip link
Don't use routerLink as some pages react on route params changes Prefer to programmatically focus the main content if we can
This commit is contained in:
parent
bd4b321b0b
commit
f47762c60b
|
@ -1,5 +1,7 @@
|
|||
<div *ngIf="customCSS" [innerHTML]="customCSS"></div>
|
||||
|
||||
<a i18n class="visually-hidden-focusable skip-to-content" href="#content" (click)="$event.preventDefault(); mainContent.focus()">Skip to main content</a>
|
||||
|
||||
<my-hotkeys-cheatsheet (hotkeysModalStateChange)="onHotkeysModalStateChange($event)"></my-hotkeys-cheatsheet>
|
||||
|
||||
<div
|
||||
|
@ -30,7 +32,7 @@
|
|||
<div class="sub-header-container">
|
||||
<my-menu id="left-menu" role="navigation" aria-label="Main menu" i18n-ariaLabel [hidden]="!menu.isMenuDisplayed"></my-menu>
|
||||
|
||||
<main id="content" class="main-col" [ngClass]="{ expanded: menu.isMenuDisplayed === false }">
|
||||
<main #mainContent tabindex="-1" id="content" class="main-col" [ngClass]="{ expanded: menu.isMenuDisplayed === false }">
|
||||
|
||||
<div class="main-row">
|
||||
|
||||
|
|
|
@ -1,6 +1,18 @@
|
|||
@use '_variables' as *;
|
||||
@use '_mixins' as *;
|
||||
|
||||
.skip-to-content {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
display: block;
|
||||
z-index: z(modal);
|
||||
width: 100%;
|
||||
background: pvar(--mainBackgroundColor);
|
||||
padding: 1rem;
|
||||
text-align: center;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.peertube-container {
|
||||
padding-bottom: 20px;
|
||||
|
||||
|
|
Loading…
Reference in New Issue