1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-09 09:51:02 +01:00

[PM-8615] Filters Accessibility tweaks (#9538)

* wrap filters in a role="toolbar" & add aria label

* announce deactivated org message when presented to the user
This commit is contained in:
Nick Krantz 2024-06-20 14:21:22 -05:00 committed by GitHub
parent 1763324a89
commit 82f8641926
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 54 additions and 44 deletions

View File

@ -3494,5 +3494,8 @@
},
"contactYourOrgAdmin": {
"message": "Items in deactivated organizations cannot be accessed. Contact your organization owner for assistance."
},
"filters": {
"message": "Filters"
}
}

View File

@ -1,3 +1,4 @@
<div role="toolbar" [ariaLabel]="'filters' | i18n">
<form [formGroup]="filterForm" class="tw-flex tw-flex-wrap tw-gap-2 tw-mb-6 tw-mt-2">
<ng-container *ngIf="organizations$ | async as organizations">
<bit-chip-select
@ -37,3 +38,4 @@
>
</bit-chip-select>
</form>
</div>

View File

@ -33,15 +33,20 @@
</bit-no-items>
</div>
<!-- For better consistency with screen readers, the role/aria needs to be on an element that isn't dynamic by *ngIf -->
<div role="status" aria-live="polite">
<div
*ngIf="vaultState === VaultStateEnum.DeactivatedOrg"
class="tw-flex tw-flex-col tw-justify-center tw-h-auto tw-pt-12"
>
<bit-no-items [icon]="deactivatedIcon">
<ng-container slot="title">{{ "organizationIsDeactivated" | i18n }}</ng-container>
<ng-container slot="title">
{{ "organizationIsDeactivated" | i18n }}
</ng-container>
<ng-container slot="description">{{ "contactYourOrgAdmin" | i18n }}</ng-container>
</bit-no-items>
</div>
</div>
<ng-container *ngIf="vaultState === null">
<app-autofill-vault-list-items></app-autofill-vault-list-items>