mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-22 11:45:59 +01:00
[PS-1307] Desktop: Change box-headers from <div>
to semantic headings (#3313)
* Change box-headers from generic `<div>` to semantic headings, tweak heading styles Essentially, a late port to desktop of aspects from https://github.com/bitwarden/clients/pull/2223 (which I hadn't realised at the time also affected the desktop app) * Change box headers in modals to `<h1>`s * Fix/normalise modals * Harmonise modal dialog headings, use `aria-labelledby`
This commit is contained in:
parent
e59f635d32
commit
89b69f4bc6
@ -1,4 +1,4 @@
|
||||
<div class="modal fade" role="dialog" aria-modal="true" attr.aria-label="{{ 'settings' | i18n }}">
|
||||
<div class="modal fade" role="dialog" aria-modal="true" aria-labelledby="deleteAccountTitle">
|
||||
<div class="modal-dialog" role="document">
|
||||
<form
|
||||
class="modal-content"
|
||||
@ -13,7 +13,9 @@
|
||||
{{ "deleteAccountWarning" | i18n }}
|
||||
</app-callout>
|
||||
<div class="box last">
|
||||
<div class="box-header">{{ "deleteAccount" | i18n }}</div>
|
||||
<h1 class="box-header" id="deleteAccountTitle">
|
||||
{{ "deleteAccount" | i18n }}
|
||||
</h1>
|
||||
<div class="box-content">
|
||||
<app-user-verification
|
||||
ngDefaultControl
|
||||
|
@ -1,11 +1,11 @@
|
||||
<div class="modal fade" role="dialog" aria-modal="true" attr.aria-label="{{ 'settings' | i18n }}">
|
||||
<div class="modal fade" role="dialog" aria-modal="true" aria-labelledby="selfHosteEnvironmentTitle">
|
||||
<div class="modal-dialog" role="document">
|
||||
<form class="modal-content" (ngSubmit)="submit()">
|
||||
<div class="modal-body">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h1 class="box-header" id="selfHosteEnvironmentTitle">
|
||||
{{ "selfHostedEnvironment" | i18n }}
|
||||
</div>
|
||||
</h1>
|
||||
<div class="box-content">
|
||||
<div class="box-content-row" appBoxRow>
|
||||
<label for="baseUrl">{{ "baseUrl" | i18n }}</label>
|
||||
@ -24,13 +24,13 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h2 class="box-header">
|
||||
<button type="button" (click)="toggleCustom()" [attr.aria-expanded]="showCustom">
|
||||
<i class="bwi bwi-plus-square" [hidden]="showCustom" aria-hidden="true"></i>
|
||||
<i class="bwi bwi-minus-square" [hidden]="!showCustom" aria-hidden="true"></i>
|
||||
{{ "customEnvironment" | i18n }}
|
||||
</button>
|
||||
</div>
|
||||
</h2>
|
||||
<div class="box-content" [hidden]="!showCustom">
|
||||
<div class="box-content-row" appBoxRow>
|
||||
<label for="webVaultUrl">{{ "webVaultUrl" | i18n }}</label>
|
||||
|
@ -3,9 +3,9 @@
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<div class="box">
|
||||
<div class="box-header" id="premiumTitle">
|
||||
<h1 class="box-header" id="premiumTitle">
|
||||
{{ "premiumMembership" | i18n }}
|
||||
</div>
|
||||
</h1>
|
||||
<div class="box-content box-content-padded">
|
||||
<div *ngIf="!isPremium">
|
||||
<p class="text-center lead">{{ "premiumNotCurrentMember" | i18n }}</p>
|
||||
|
@ -1,11 +1,11 @@
|
||||
<div class="modal fade" role="dialog" aria-modal="true" attr.aria-label="{{ 'settings' | i18n }}">
|
||||
<div class="modal fade" role="dialog" aria-modal="true" aria-labelledby="settingsTitle">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body form">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h1 class="box-header" id="settingsTitle">
|
||||
{{ "settingsTitle" | i18n: currentUserEmail }}
|
||||
</div>
|
||||
</h1>
|
||||
<div class="box-content box-content-padded">
|
||||
<h2>
|
||||
<button
|
||||
|
@ -3,9 +3,9 @@
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<div class="box">
|
||||
<div class="box-header" id="twoStepTitle">
|
||||
<h1 class="box-header" id="twoStepTitle">
|
||||
{{ "twoStepOptions" | i18n }}
|
||||
</div>
|
||||
</h1>
|
||||
<div class="box-content">
|
||||
<button
|
||||
type="button"
|
||||
|
@ -1,9 +1,11 @@
|
||||
<div class="modal fade" role="dialog" aria-modal="true">
|
||||
<div class="modal fade" role="dialog" aria-modal="true" aria-labelledby="passwordConfirmationTitle">
|
||||
<div class="modal-dialog modal-dialog-scrollable" role="document">
|
||||
<form class="modal-content" #form (ngSubmit)="submit()">
|
||||
<div class="modal-body">
|
||||
<div class="box">
|
||||
<div class="box-header">{{ "passwordConfirmation" | i18n }}</div>
|
||||
<h1 class="box-header" id="passwordConfirmationTitle">
|
||||
{{ "passwordConfirmation" | i18n }}
|
||||
</h1>
|
||||
<div class="box-content">
|
||||
<div class="box-content-row box-content-row-flex" appBoxRow>
|
||||
<div class="row-main">
|
||||
|
@ -10,9 +10,9 @@
|
||||
</app-callout>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h2 class="box-header">
|
||||
{{ title }}
|
||||
</div>
|
||||
</h2>
|
||||
<div class="box-content">
|
||||
<div class="box-content-row" appBoxRow>
|
||||
<label for="name">{{ "name" | i18n }}</label>
|
||||
@ -92,7 +92,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h2 class="box-header">
|
||||
<button
|
||||
type="button"
|
||||
class="toggle"
|
||||
@ -107,7 +107,7 @@
|
||||
[ngClass]="{ 'bwi-angle-down': !showOptions, 'bwi-chevron-up': showOptions }"
|
||||
></i>
|
||||
</button>
|
||||
</div>
|
||||
</h2>
|
||||
</div>
|
||||
<div [hidden]="!showOptions">
|
||||
<app-send-efflux-dates
|
||||
@ -179,9 +179,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h2 class="box-header">
|
||||
{{ "notes" | i18n }}
|
||||
</div>
|
||||
</h2>
|
||||
<div class="box-content">
|
||||
<div class="box-content-row" appBoxRow>
|
||||
<textarea
|
||||
@ -227,9 +227,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h2 class="box-header">
|
||||
{{ "share" | i18n }}
|
||||
</div>
|
||||
</h2>
|
||||
<div class="box-content">
|
||||
<div class="box-content-row" appBoxRow *ngIf="editMode">
|
||||
<label for="link">{{ "sendLinkLabel" | i18n }}</label>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h2 class="box-header">
|
||||
{{ "customFields" | i18n }}
|
||||
</div>
|
||||
</h2>
|
||||
<div class="box-content">
|
||||
<div cdkDropList (cdkDropListDropped)="drop($event)" *ngIf="cipher.hasFields">
|
||||
<div
|
||||
|
@ -5,9 +5,9 @@
|
||||
<app-callout type="info" *ngIf="allowOwnershipOptions() && !allowPersonal">
|
||||
{{ "personalOwnershipPolicyInEffect" | i18n }}
|
||||
</app-callout>
|
||||
<div class="box-header">
|
||||
<h2 class="box-header">
|
||||
{{ title }}
|
||||
</div>
|
||||
</h2>
|
||||
<div class="box-content">
|
||||
<div class="box-content-row" *ngIf="!editMode" appBoxRow>
|
||||
<label for="type">{{ "type" | i18n }}</label>
|
||||
@ -504,9 +504,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h2 class="box-header">
|
||||
<label for="notes">{{ "notes" | i18n }}</label>
|
||||
</div>
|
||||
</h2>
|
||||
<div class="box-content">
|
||||
<div class="box-content-row" appBoxRow>
|
||||
<textarea id="notes" name="Notes" rows="6" [(ngModel)]="cipher.notes"></textarea>
|
||||
@ -520,9 +520,9 @@
|
||||
>
|
||||
</app-vault-add-edit-custom-fields>
|
||||
<div class="box" *ngIf="allowOwnershipOptions()">
|
||||
<div class="box-header">
|
||||
<h2 class="box-header">
|
||||
{{ "ownership" | i18n }}
|
||||
</div>
|
||||
</h2>
|
||||
<div class="box-content">
|
||||
<div class="box-content-row" appBoxRow>
|
||||
<label for="organizationId">{{ "whoOwnsThisItem" | i18n }}</label>
|
||||
@ -539,9 +539,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="box" *ngIf="(!editMode || cloneMode) && cipher.organizationId">
|
||||
<div class="box-header">
|
||||
<h2 class="box-header">
|
||||
{{ "collections" | i18n }}
|
||||
</div>
|
||||
</h2>
|
||||
<div class="box-content" *ngIf="!collections || !collections.length">
|
||||
{{ "noCollectionsInList" | i18n }}
|
||||
</div>
|
||||
|
@ -3,9 +3,9 @@
|
||||
<form class="modal-content" #form (ngSubmit)="submit()" [appApiAction]="formPromise">
|
||||
<div class="modal-body">
|
||||
<div class="box" *ngIf="cipher && cipher.hasAttachments">
|
||||
<div class="box-header" id="attachmentsTitle">
|
||||
<h1 class="box-header" id="attachmentsTitle">
|
||||
{{ "attachments" | i18n }}
|
||||
</div>
|
||||
</h1>
|
||||
<div class="box-content no-hover">
|
||||
<div class="box-content-row box-content-row-flex" *ngFor="let a of cipher.attachments">
|
||||
<div class="row-main">
|
||||
@ -39,9 +39,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h2 class="box-header">
|
||||
{{ "newAttachment" | i18n }}
|
||||
</div>
|
||||
</h2>
|
||||
<div class="box-content no-hover">
|
||||
<div class="box-content-row">
|
||||
<label for="file">{{ "file" | i18n }}</label>
|
||||
|
@ -3,9 +3,9 @@
|
||||
<form class="modal-content" #form (ngSubmit)="submit()" [appApiAction]="formPromise">
|
||||
<div class="modal-body">
|
||||
<div class="box">
|
||||
<div class="box-header" id="collectionsTitle">
|
||||
<h1 class="box-header" id="collectionsTitle">
|
||||
{{ "collections" | i18n }}
|
||||
</div>
|
||||
</h1>
|
||||
<div class="box-content" *ngIf="!collections || !collections.length">
|
||||
{{ "noCollectionsInList" | i18n }}
|
||||
</div>
|
||||
|
@ -11,9 +11,9 @@
|
||||
</app-callout>
|
||||
<app-export-scope-callout *ngIf="!disabledByPolicy"></app-export-scope-callout>
|
||||
<div class="box">
|
||||
<div class="box-header" id="exportTitle">
|
||||
<h1 class="box-header" id="exportTitle">
|
||||
{{ "exportVault" | i18n }}
|
||||
</div>
|
||||
</h1>
|
||||
<div class="box-content">
|
||||
<div class="box-content-row" appBoxRow>
|
||||
<label for="format">{{ "fileFormat" | i18n }}</label>
|
||||
|
@ -3,9 +3,9 @@
|
||||
<form class="modal-content" #form (ngSubmit)="submit()" [appApiAction]="formPromise">
|
||||
<div class="modal-body">
|
||||
<div class="box">
|
||||
<div class="box-header" id="folderAddEditTitle">
|
||||
<h1 class="box-header" id="folderAddEditTitle">
|
||||
{{ title }}
|
||||
</div>
|
||||
</h1>
|
||||
<div class="box-content">
|
||||
<div class="box-content-row" appBoxRow>
|
||||
<label for="name">{{ "name" | i18n }}</label>
|
||||
|
@ -1,15 +1,10 @@
|
||||
<div
|
||||
class="modal fade"
|
||||
role="dialog"
|
||||
aria-modal="true"
|
||||
attr.aria-label="{{ 'generatePassword' | i18n }}"
|
||||
>
|
||||
<div class="modal fade" role="dialog" aria-modal="true" aria-labelledby="generatorTitle">
|
||||
<div class="modal-dialog modal-md" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<div class="modal-title">
|
||||
<h1 class="modal-title" id="generatorTitle">
|
||||
{{ "generator" | i18n }}
|
||||
</div>
|
||||
</h1>
|
||||
<app-callout
|
||||
type="info"
|
||||
*ngIf="enforcedPasswordPolicyOptions?.inEffect() && type === 'password'"
|
||||
@ -103,7 +98,7 @@
|
||||
</div>
|
||||
<ng-container *ngIf="type === 'password'">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h2 class="box-header">
|
||||
<button
|
||||
type="button"
|
||||
(click)="toggleOptions()"
|
||||
@ -114,7 +109,7 @@
|
||||
<i class="bwi bwi-minus-square" aria-hidden="true" [hidden]="!showOptions"></i>
|
||||
{{ "options" | i18n }}
|
||||
</button>
|
||||
</div>
|
||||
</h2>
|
||||
<div class="box-content condensed" [hidden]="!showOptions">
|
||||
<div
|
||||
class="box-content-row box-content-row-radio"
|
||||
@ -303,7 +298,7 @@
|
||||
</ng-container>
|
||||
<ng-container *ngIf="type === 'username'">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h2 class="box-header">
|
||||
<button
|
||||
type="button"
|
||||
(click)="toggleOptions()"
|
||||
@ -314,7 +309,7 @@
|
||||
<i class="bwi bwi-minus-square" aria-hidden="true" [hidden]="!showOptions"></i>
|
||||
{{ "options" | i18n }}
|
||||
</button>
|
||||
</div>
|
||||
</h2>
|
||||
<div class="box-content condensed" [hidden]="!showOptions">
|
||||
<div
|
||||
class="box-content-row box-content-row-radio"
|
||||
|
@ -3,9 +3,9 @@
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<div class="box">
|
||||
<div class="box-header" id="passwordGenHistoryTitle">
|
||||
<h1 class="box-header" id="passwordGenHistoryTitle">
|
||||
{{ "passwordHistory" | i18n }}
|
||||
</div>
|
||||
</h1>
|
||||
<div class="box-content condensed">
|
||||
<div class="box-content-row box-content-row-flex" *ngFor="let h of history">
|
||||
<div class="row-main">
|
||||
|
@ -3,9 +3,9 @@
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<div class="box">
|
||||
<div class="box-header" id="passwordHistoryTitle">
|
||||
<h1 class="box-header" id="passwordHistoryTitle">
|
||||
{{ "passwordHistory" | i18n }}
|
||||
</div>
|
||||
</h1>
|
||||
<div class="box-content condensed">
|
||||
<div class="box-content-row box-content-row-flex" *ngFor="let h of history">
|
||||
<div class="row-main">
|
||||
|
@ -3,9 +3,9 @@
|
||||
<form class="modal-content" #form (ngSubmit)="submit()" [appApiAction]="formPromise">
|
||||
<div class="modal-body">
|
||||
<div class="box">
|
||||
<div class="box-header" id="moveToOrgTitle">
|
||||
<h1 class="box-header" id="moveToOrgTitle">
|
||||
{{ "moveToOrganization" | i18n }}
|
||||
</div>
|
||||
</h1>
|
||||
<div class="box-content" *ngIf="!organizations || !organizations.length">
|
||||
<div class="box-content-row">
|
||||
{{ "noOrganizationsList" | i18n }}
|
||||
@ -29,9 +29,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="box" *ngIf="organizations && organizations.length">
|
||||
<div class="box-header">
|
||||
<h2 class="box-header">
|
||||
{{ "collections" | i18n }}
|
||||
</div>
|
||||
</h2>
|
||||
<div class="box-content" *ngIf="!collections || !collections.length">
|
||||
{{ "noCollectionsInList" | i18n }}
|
||||
</div>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h2 class="box-header">
|
||||
{{ "customFields" | i18n }}
|
||||
</div>
|
||||
</h2>
|
||||
<div class="box-content">
|
||||
<div class="box-content-row box-content-row-flex" *ngFor="let field of cipher.fields">
|
||||
<div class="row-main">
|
||||
|
@ -1,9 +1,9 @@
|
||||
<div class="content">
|
||||
<div class="inner-content" *ngIf="cipher">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h2 class="box-header">
|
||||
{{ "itemInformation" | i18n }}
|
||||
</div>
|
||||
</h2>
|
||||
<div class="box-content">
|
||||
<div class="box-content-row">
|
||||
<span class="row-label">{{ "name" | i18n }}</span>
|
||||
@ -321,9 +321,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="box" *ngIf="cipher.notes">
|
||||
<div class="box-header">
|
||||
<h2 class="box-header">
|
||||
{{ "notes" | i18n }}
|
||||
</div>
|
||||
</h2>
|
||||
<div class="box-content">
|
||||
<div class="box-content-row pre-wrap">{{ cipher.notes }}</div>
|
||||
</div>
|
||||
@ -336,9 +336,9 @@
|
||||
>
|
||||
</app-vault-view-custom-fields>
|
||||
<div class="box" *ngIf="cipher.hasAttachments && (canAccessPremium || cipher.organizationId)">
|
||||
<div class="box-header">
|
||||
<h2 class="box-header">
|
||||
{{ "attachments" | i18n }}
|
||||
</div>
|
||||
</h2>
|
||||
<div class="box-content">
|
||||
<button
|
||||
type="button"
|
||||
|
@ -31,10 +31,8 @@ h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-family: $font-family-sans-serif;
|
||||
|
||||
@include themify($themes) {
|
||||
color: themed("textColor");
|
||||
}
|
||||
font-size: $font-size-base;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
p {
|
||||
|
Loading…
Reference in New Issue
Block a user