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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user