1
0
mirror of https://github.com/bitwarden/desktop synced 2025-12-23 11:43:45 +00:00

[AccountSwitching]Make account switcher accessible (#1289)

* Make account switcher keyboard accessible

* ScreenReader: Announce submenu and expansion

* ScreenReader: Announc switch account button with account info

* Fix tab focus on dropdown

* Fix esc not changing state

* Fix linting issues

Co-authored-by: Hinton <oscar@oscarhinton.com>
This commit is contained in:
Daniel James Smith
2022-02-03 17:46:14 +01:00
committed by GitHub
parent 3e8705d548
commit 2b58861296
3 changed files with 43 additions and 17 deletions

View File

@@ -107,14 +107,18 @@ export class AccountSwitcherComponent implements OnInit {
this.isOpen = !this.isOpen;
}
close() {
this.isOpen = false;
}
async switch(userId: string) {
this.toggle();
this.close();
this.messagingService.send("switchAccount", { userId: userId });
}
async addAccount() {
this.toggle();
this.close();
await this.stateService.setActiveUser(null);
}