1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 01:03:35 +00:00

[CL-133] add skip links to bit-layout (#7213)

* Add light LinkType to link directive

* add skip link to bit-layout; update i18n for all apps

* install storybook interaction testing packages

* update storybook config

* add skiplink story to bit-layout

* update route and focus logic

* remove focus ring
This commit is contained in:
Will Martin
2023-12-15 09:06:05 -05:00
committed by GitHub
parent b73d73b508
commit e102919c2f
10 changed files with 642 additions and 7 deletions

View File

@@ -1,5 +1,8 @@
import { CommonModule } from "@angular/common";
import { Component, Input } from "@angular/core";
import { RouterModule } from "@angular/router";
import { LinkModule } from "../link";
import { SharedModule } from "../shared";
export type LayoutVariant = "primary" | "secondary";
@@ -7,8 +10,14 @@ export type LayoutVariant = "primary" | "secondary";
selector: "bit-layout",
templateUrl: "layout.component.html",
standalone: true,
imports: [CommonModule],
imports: [SharedModule, LinkModule, RouterModule],
})
export class LayoutComponent {
protected mainContentId = "main-content";
@Input() variant: LayoutVariant = "primary";
focusMainContent() {
document.getElementById(this.mainContentId)?.focus();
}
}