From 1fb80ac7511de4913a3342e64907f675e90f95b8 Mon Sep 17 00:00:00 2001 From: "Patrick H. Lauke" Date: Sun, 28 May 2023 19:58:02 +0100 Subject: [PATCH] Tweak account switch buttons in dialog/dropdown * Take out the confusing "Logged in as..." a11y text * Use visible button text (with a few extra `sr-only` parts, for readability) as the button's accName * Add the "Switch account" context to each of the buttons to make clear what they do --- .../vault/vault-select.component.ts | 4 +-- .../layout/account-switcher.component.html | 33 ++++++++++--------- .../app/layout/account-switcher.component.ts | 2 +- .../environment-selector.component.html | 2 +- .../environment-selector.component.ts | 2 +- 5 files changed, 22 insertions(+), 21 deletions(-) diff --git a/apps/browser/src/vault/popup/components/vault/vault-select.component.ts b/apps/browser/src/vault/popup/components/vault/vault-select.component.ts index 07ba3fdfa37..aea920ad2a1 100644 --- a/apps/browser/src/vault/popup/components/vault/vault-select.component.ts +++ b/apps/browser/src/vault/popup/components/vault/vault-select.component.ts @@ -62,7 +62,7 @@ export class VaultSelectComponent implements OnInit, OnDestroy { selectedVault$: Observable = this._selectedVault.asObservable(); enforcePersonalOwnership = false; - overlayPosition: ConnectedPosition[] = [ + overlayPostition: ConnectedPosition[] = [ { originX: "start", originY: "bottom", @@ -149,7 +149,7 @@ export class VaultSelectComponent implements OnInit, OnDestroy { .withPush(true) .withViewportMargin(10) .withGrowAfterOpen(true) - .withPositions(this.overlayPosition); + .withPositions(this.overlayPostition); this.overlayRef = this.overlay.create({ hasBackdrop: true, diff --git a/apps/desktop/src/app/layout/account-switcher.component.html b/apps/desktop/src/app/layout/account-switcher.component.html index 5d58dfc44a1..c9bf8043f37 100644 --- a/apps/desktop/src/app/layout/account-switcher.component.html +++ b/apps/desktop/src/app/layout/account-switcher.component.html @@ -21,7 +21,8 @@ aria-hidden="true" > {{ activeAccount.email }} ({{ "switchAccount" | i18n }}){{ activeAccount.email + }} ({{ "switchAccount" | i18n }}) @@ -54,13 +55,7 @@ aria-modal="true" >
-