mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-26 17:08:33 +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:
parent
1763324a89
commit
82f8641926
@ -3494,5 +3494,8 @@
|
||||
},
|
||||
"contactYourOrgAdmin": {
|
||||
"message": "Items in deactivated organizations cannot be accessed. Contact your organization owner for assistance."
|
||||
},
|
||||
"filters": {
|
||||
"message": "Filters"
|
||||
}
|
||||
}
|
||||
|
@ -1,39 +1,41 @@
|
||||
<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">
|
||||
<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
|
||||
*ngIf="organizations.length"
|
||||
formControlName="organization"
|
||||
placeholderIcon="bwi-vault"
|
||||
[placeholderText]="'vault' | i18n"
|
||||
[options]="organizations"
|
||||
>
|
||||
</bit-chip-select>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="collections$ | async as collections">
|
||||
<bit-chip-select
|
||||
*ngIf="collections.length"
|
||||
formControlName="collection"
|
||||
placeholderIcon="bwi-collection"
|
||||
[placeholderText]="'collection' | i18n"
|
||||
[options]="collections"
|
||||
>
|
||||
</bit-chip-select>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="folders$ | async as folders">
|
||||
<bit-chip-select
|
||||
*ngIf="folders.length"
|
||||
placeholderIcon="bwi-folder"
|
||||
formControlName="folder"
|
||||
[placeholderText]="'folder' | i18n"
|
||||
[options]="folders"
|
||||
>
|
||||
</bit-chip-select>
|
||||
</ng-container>
|
||||
<bit-chip-select
|
||||
*ngIf="organizations.length"
|
||||
formControlName="organization"
|
||||
placeholderIcon="bwi-vault"
|
||||
[placeholderText]="'vault' | i18n"
|
||||
[options]="organizations"
|
||||
formControlName="cipherType"
|
||||
placeholderIcon="bwi-list"
|
||||
[placeholderText]="'type' | i18n"
|
||||
[options]="cipherTypes"
|
||||
>
|
||||
</bit-chip-select>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="collections$ | async as collections">
|
||||
<bit-chip-select
|
||||
*ngIf="collections.length"
|
||||
formControlName="collection"
|
||||
placeholderIcon="bwi-collection"
|
||||
[placeholderText]="'collection' | i18n"
|
||||
[options]="collections"
|
||||
>
|
||||
</bit-chip-select>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="folders$ | async as folders">
|
||||
<bit-chip-select
|
||||
*ngIf="folders.length"
|
||||
placeholderIcon="bwi-folder"
|
||||
formControlName="folder"
|
||||
[placeholderText]="'folder' | i18n"
|
||||
[options]="folders"
|
||||
>
|
||||
</bit-chip-select>
|
||||
</ng-container>
|
||||
<bit-chip-select
|
||||
formControlName="cipherType"
|
||||
placeholderIcon="bwi-list"
|
||||
[placeholderText]="'type' | i18n"
|
||||
[options]="cipherTypes"
|
||||
>
|
||||
</bit-chip-select>
|
||||
</form>
|
||||
</form>
|
||||
</div>
|
||||
|
@ -33,14 +33,19 @@
|
||||
</bit-no-items>
|
||||
</div>
|
||||
|
||||
<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="description">{{ "contactYourOrgAdmin" | i18n }}</ng-container>
|
||||
</bit-no-items>
|
||||
<!-- 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="description">{{ "contactYourOrgAdmin" | i18n }}</ng-container>
|
||||
</bit-no-items>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ng-container *ngIf="vaultState === null">
|
||||
|
Loading…
Reference in New Issue
Block a user