mirror of
https://github.com/bitwarden/browser
synced 2025-01-20 00:12:09 +01:00
Merge pull request #2234 from patrickhlauke/patrickhlauke-issue1983
A11y: make expandable box headers keyboard-operable, expose correct role/state
This commit is contained in:
commit
70925871b0
@ -20,9 +20,12 @@
|
||||
}
|
||||
|
||||
.box-header-expandable {
|
||||
margin: 0 10px 5px 10px;
|
||||
padding: 0 10px;
|
||||
margin-bottom: 5px;
|
||||
text-transform: uppercase;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
|
||||
@include themify($themes) {
|
||||
color: themed('headingColor');
|
||||
|
@ -110,10 +110,12 @@
|
||||
</div>
|
||||
<!-- Options -->
|
||||
<div class="box">
|
||||
<h2 class="box-header-expandable" (click)="showOptions = !showOptions">
|
||||
<h2>
|
||||
<button type="button" class="box-header-expandable" (click)="showOptions = !showOptions" [attr.aria-expanded]="showOptions">
|
||||
{{'options' | i18n}}
|
||||
<i *ngIf="!showOptions" class="fa fa-chevron-down fa-sm icon"></i>
|
||||
<i *ngIf="showOptions" class="fa fa-chevron-up fa-sm icon"></i>
|
||||
<i *ngIf="!showOptions" class="fa fa-chevron-down fa-sm icon" aria-hidden="true"></i>
|
||||
<i *ngIf="showOptions" class="fa fa-chevron-up fa-sm icon" aria-hidden="true"></i>
|
||||
</button>
|
||||
</h2>
|
||||
</div>
|
||||
<div [hidden]="!showOptions">
|
||||
|
@ -12,10 +12,12 @@
|
||||
</header>
|
||||
<content>
|
||||
<div class="box">
|
||||
<h2 class="box-header-expandable" (click)="showGeneral = !showGeneral">
|
||||
<h2>
|
||||
<button type="button" class="box-header-expandable" (click)="showGeneral = !showGeneral" [attr.aria-expanded]="showGeneral">
|
||||
General
|
||||
<i *ngIf="!showGeneral" class="fa fa-chevron-down fa-sm icon"></i>
|
||||
<i *ngIf="showGeneral" class="fa fa-chevron-up fa-sm icon"></i>
|
||||
<i *ngIf="!showGeneral" class="fa fa-chevron-down fa-sm icon" aria-hidden="true"></i>
|
||||
<i *ngIf="showGeneral" class="fa fa-chevron-up fa-sm icon" aria-hidden="true"></i>
|
||||
</button>
|
||||
</h2>
|
||||
</div>
|
||||
<ng-container *ngIf="showGeneral">
|
||||
@ -84,10 +86,12 @@
|
||||
</div>
|
||||
</ng-container>
|
||||
<div class="box box-section-divider">
|
||||
<h2 class="box-header-expandable" (click)="showDisplay = !showDisplay">
|
||||
<h2>
|
||||
<button type="button" class="box-header-expandable" (click)="showDisplay = !showDisplay" [attr.aria-expanded]="showDisplay">
|
||||
Display
|
||||
<i *ngIf="!showDisplay" class="fa fa-chevron-down fa-sm icon"></i>
|
||||
<i *ngIf="showDisplay" class="fa fa-chevron-up fa-sm icon"></i>
|
||||
<i *ngIf="!showDisplay" class="fa fa-chevron-down fa-sm icon" aria-hidden="true"></i>
|
||||
<i *ngIf="showDisplay" class="fa fa-chevron-up fa-sm icon" aria-hidden="true"></i>
|
||||
</button>
|
||||
</h2>
|
||||
</div>
|
||||
<ng-container *ngIf="showDisplay">
|
||||
@ -141,10 +145,12 @@
|
||||
</div>
|
||||
</ng-container>
|
||||
<div class="box box-section-divider">
|
||||
<h2 class="box-header-expandable" (click)="showAutofill = !showAutofill">
|
||||
<h2>
|
||||
<button type="button" class="box-header-expandable" (click)="showAutofill = !showAutofill" [attr.aria-expanded]="showAutofill">
|
||||
Autofill
|
||||
<i *ngIf="!showAutofill" class="fa fa-chevron-down fa-sm icon"></i>
|
||||
<i *ngIf="showAutofill" class="fa fa-chevron-up fa-sm icon"></i>
|
||||
<i *ngIf="!showAutofill" class="fa fa-chevron-down fa-sm icon" aria-hidden="true"></i>
|
||||
<i *ngIf="showAutofill" class="fa fa-chevron-up fa-sm icon" aria-hidden="true"></i>
|
||||
</button>
|
||||
</h2>
|
||||
</div>
|
||||
<ng-container *ngIf="showAutofill">
|
||||
|
Loading…
Reference in New Issue
Block a user