1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-08 04:33:38 +00:00

add focus method to link component

This commit is contained in:
Bryan Cunningham
2026-01-16 13:59:58 -05:00
parent 88fbf7511a
commit 041c9e650e
2 changed files with 5 additions and 1 deletions

View File

@@ -52,7 +52,7 @@ export class LayoutComponent {
handleKeydown(ev: KeyboardEvent) {
if (isNothingFocused()) {
ev.preventDefault();
this.skipLink().el.nativeElement.focus();
this.skipLink().focus();
}
}
}

View File

@@ -128,6 +128,10 @@ export class LinkComponent {
.concat(linkStyles[this.linkType()] ?? []);
});
focus() {
this.el.nativeElement.focus();
}
constructor() {
if (this.isButton) {
ariaDisableElement(this.el.nativeElement, this.disabled);