Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h2>{{'admin.edit-user-agreement.header' | translate}}</h2>

<ng-template #content let-c="close" let-d="dismiss">
<div class="modal-header">
<h4 class="modal-title text-info">{{'admin.edit-user-agreement.confirm.title' | translate}}</h4>
<h4 id="modal-title" class="modal-title text-info">{{'admin.edit-user-agreement.confirm.title' | translate}}</h4>
</div>
<div class="modal-body">
<p>{{'admin.edit-user-agreement.confirm.info' | translate}}</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,10 +312,10 @@ <h1 class="flex-grow-1">{{ isNewService ? ('ldn-create-service.title' | translat
<ng-template #confirmModal>
<div class="modal-header">
@if (!isNewService) {
<h4>{{'service.overview.edit.modal' | translate }}</h4>
<h4 id="modal-title" class="modal-title">{{'service.overview.edit.modal' | translate }}</h4>
}
@if (isNewService) {
<h4>{{'service.overview.create.modal' | translate }}</h4>
<h4 id="modal-title" class="modal-title">{{'service.overview.create.modal' | translate }}</h4>
}
<button (click)="closeModal()" aria-label="Close" class="btn-close" type="button">
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ <h1 class="flex-grow-1">{{ 'ldn-registered-services.title' | translate }}</h1>

<div class="modal-header">
<div>
<h4>{{'service.overview.delete.header' | translate }}</h4>
<h4 id="modal-title" class="modal-title">{{'service.overview.delete.header' | translate }}</h4>
</div>
<button (click)="closeModal()" aria-label="Close"
[attr.aria-label]="'ldn-service-overview-close-modal' | translate"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="modal-header">
<h4 class="modal-title">{{'notify-message-modal.title' | translate}}</h4>
<h4 id="modal-title" class="modal-title">{{'notify-message-modal.title' | translate}}</h4>
<button type="button" class="btn-close" aria-label="Close" (click)="activeModal.dismiss('Cross click')">
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<div>
<div class="modal-header">{{'supervision-group-selector.header' | translate}}
<div class="modal-header">
<h4 id="modal-title" class="modal-title h4 mb-0">{{'supervision-group-selector.header' | translate}}</h4>
<button type="button" class="btn-close" (click)="close()" aria-label="Close">
</button>
</div>
Expand Down
2 changes: 2 additions & 0 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ export class AppComponent implements OnInit, AfterViewInit {
return true;
};

this.modalConfig.ariaLabelledBy = 'modal-title';

this.isAuthBlocking$ = this.store.pipe(
select(isAuthenticationBlocking),
distinctUntilChanged(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="modal-header">
<h4 class="modal-title">New name variant</h4>
<h4 id="modal-title" class="modal-title">New name variant</h4>
<button type="button" class="btn-close" aria-label="Close" (click)="modal.dismiss('Cross click')">
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ <h4 class="mt-2">{{ 'external-login.component.or' | translate }}</h4>

<ng-template #loginModal let-c="close" let-d="dismiss">
<div class="modal-header">
<h4 class="modal-title text-info"> {{ 'external-login.connect-to-existing-account.label' | translate }}</h4>
<h4 id="modal-title" class="modal-title text-info"> {{ 'external-login.connect-to-existing-account.label' | translate }}</h4>
</div>
<div class="modal-body">
<div class="row justify-content-center">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ <h5 (click)="setSelected(typeDto.relationshipType, !selected)">
<ng-template #virtualMetadataModal>
<div class="thumb-font-1">
<div class="modal-header">
{{'virtual-metadata.delete-item.modal-head' | translate}}
<h4 id="modal-title" class="modal-title h4 mb-0">{{'virtual-metadata.delete-item.modal-head' | translate}}</h4>
<button type="button" class="btn-close"
(click)="closeVirtualMetadataModal()" aria-label="Close">
</button>
Expand Down Expand Up @@ -86,9 +86,9 @@ <h5 (click)="setSelected(typeDto.relationshipType, !selected)">

<ng-template #deleteConfirmationModal>
<div class="modal-header bg-light text-dark">
<h5 class="modal-title">
<h4 id="modal-title" class="modal-title">
{{'item.edit.delete.confirmation-title' | translate}}
</h5>
</h4>
<button type="button" class="btn-close" aria-label="Close" (click)="modalRef.close()"></button>
</div>
<div class="modal-body">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<div [ngClass]="showThumbnails ? 'hide-modal-thumbnail-column' : ''">
<div class="modal-header">{{'virtual-metadata.delete-relationship.modal-head' | translate}}
<div class="modal-header">
<h4 id="modal-title" class="modal-title h4 mb-0">{{'virtual-metadata.delete-relationship.modal-head' | translate}}</h4>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By changing this into an h4, it's also changing to the automatic style of an h4 and much larger font. While you could override that I'm sure, I think adding a semantic header can be out of the scope of this ticket and it may just be best to leave this element as a <span>. Similarly, in the cases here where there are already header elements for the title (for example submission-import-external-preview), I don't think this should change the existing h2 either.

I agree that standardizing the modals further is a good idea generally, but if anything a standard would probably be h2 for a modal header. Maybe a separate ticket for visual/semantic headers on modals would make sense in this case?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to standardize all modal titles as h4 elements for consistency.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fair! I would love to check opinions from other developers before moving forward with that though, since there have been various thoughts (see past changes to modal headers and other discussions around header structure).

It would be great to get the label/accessibility part of this fix merged though - Would you be willing to move any changes to the semantic structure of headers (any new h4s and changes to existing h*) into a followup issue (and/or PR) to continue that conversation?

<button type="button" class="btn-close" (click)="close.emit()" aria-label="Close">
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<div>
<div class="modal-header">{{'item.version.delete.modal.header' | translate}}
<div class="modal-header">
<h4 id="modal-title" class="modal-title h4 mb-0">{{'item.version.delete.modal.header' | translate}}</h4>
<button type="button" class="btn-close" (click)="onModalClose()" aria-label="Close">
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@if ((this.submitted$ | async) !== true) {
<div>
<div class="modal-header">{{'item.version.create.modal.header' | translate}}
<div class="modal-header">
<h4 id="modal-title" class="modal-title h4 mb-0">{{'item.version.create.modal.header' | translate}}</h4>
<button type="button" class="btn-close" (click)="onModalClose()" aria-label="Close">
</button>
</div>
Expand Down Expand Up @@ -37,7 +38,7 @@
</div>
</div>
} @else {
<div class="modal-header">{{'item.version.create.modal.submitted.header' | translate}}</div>
<div class="modal-header"><h4 id="modal-title" class="modal-title h4 mb-0">{{'item.version.create.modal.submitted.header' | translate}}</h4></div>
<div class="modal-body">
<p>{{'item.version.create.modal.submitted.text' | translate}}</p>
<div class="d-flex justify-content-center">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<div>
<div class="modal-header">{{'dso-selector.create.submission.head' | translate}}
<div class="modal-header">
<h4 id="modal-title" class="modal-title h4 mb-0">{{'dso-selector.create.submission.head' | translate}}</h4>
<button type="button" class="btn-close" (click)="close()" aria-label="Close">
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ <h2 class="border-bottom pb-2">

<ng-template #acceptModal let-modal>
<div class="modal-header">
<h4 class="modal-title" id="acceptModal">{{'quality-assurance.event.sure' | translate}}</h4>
Comment thread
jesielviana marked this conversation as resolved.
<h4 class="modal-title" id="modal-title">{{'quality-assurance.event.sure' | translate}}</h4>
</div>
Comment thread
jesielviana marked this conversation as resolved.
<div class="modal-body">
<p>{{'quality-assurance.event.accept.description' | translate}}</p>
Expand All @@ -314,7 +314,7 @@ <h4 class="modal-title" id="acceptModal">{{'quality-assurance.event.sure' | tran

<ng-template #ignoreModal let-modal>
<div class="modal-header">
<h1 class="modal-title h4" id="ignoreModal">{{'quality-assurance.event.sure' | translate}}</h1>
<h4 class="modal-title h4" id="modal-title">{{'quality-assurance.event.sure' | translate}}</h4>
</div>
<div class="modal-body">
<p>{{'quality-assurance.event.ignore.description' | translate}}</p>
Expand All @@ -331,7 +331,7 @@ <h1 class="modal-title h4" id="ignoreModal">{{'quality-assurance.event.sure' | t

<ng-template #rejectModal let-modal>
<div class="modal-header">
<h1 class="modal-title h4" id="rejectModal">{{'quality-assurance.event.sure' | translate}}</h1>
<h4 class="modal-title h4" id="modal-title">{{'quality-assurance.event.sure' | translate}}</h4>
</div>
<div class="modal-body">
<p>{{'quality-assurance.event.reject.description' | translate}}</p>
Expand All @@ -348,7 +348,7 @@ <h1 class="modal-title h4" id="rejectModal">{{'quality-assurance.event.sure' | t

<ng-template #undoModal let-modal>
<div class="modal-header">
<h1 class="modal-title h4" id="undoModal">{{'quality-assurance.event.sure' | translate}}</h1>
<h4 class="modal-title h4" id="modal-title">{{'quality-assurance.event.sure' | translate}}</h4>
</div>
<div class="modal-body">
<p>{{'quality-assurance.event.undo.description' | translate}}</p>
Expand Down
2 changes: 1 addition & 1 deletion src/app/process-page/detail/process-detail.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ <h1 class="flex-grow-1">
<div>
<div class="modal-header">
<div>
<h4>{{'process.detail.delete.header' | translate }}</h4>
<h4 id="modal-title" class="modal-title">{{'process.detail.delete.header' | translate }}</h4>
</div>
<button type="button" class="btn-close"
(click)="closeModal()" aria-label="Close">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ <h1 class="flex-grow-1">{{'process.overview.title' | translate}}</h1>

<div class="modal-header">
<div>
<h4>{{'process.overview.delete.header' | translate }}</h4>
<h4 id="modal-title" class="modal-title">{{'process.overview.delete.header' | translate }}</h4>
</div>
<button type="button" class="btn-close"
(click)="closeModal()" aria-label="Close">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div>
<div class="modal-header"><h4>{{'dso-selector.claim.item.head' | translate}}</h4>
<div class="modal-header"><h4 id="modal-title" class="modal-title">{{'dso-selector.claim.item.head' | translate}}</h4>
<button type="button" class="btn-close" (click)="close()" aria-label="Close">
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="modal-header">
<h4 class="modal-title">
<h4 id="modal-title" class="modal-title">
{{'access-control-select-bitstreams-modal.title' | translate}}
</h4>
<button type="button" class="btn-close" aria-label="Close"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<div>
<div class="modal-header">{{ headerLabel | translate:{ dsoName: name } }}
<div class="modal-header">
<h4 id="modal-title" class="modal-title h4 mb-0">{{ headerLabel | translate:{ dsoName: name } }}</h4>
<button type="button" class="btn-close" (click)="close()" aria-label="Close">
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<div>
@if (this.canWithdraw) {
<div class="modal-header">
{{ 'item.qa.withdrawn.modal.header' | translate }}
<h4 id="modal-title" class="modal-title h4 mb-0">{{ 'item.qa.withdrawn.modal.header' | translate }}</h4>
<button type="button" class="btn-close" (click)="onModalClose()" aria-label="Close">
</button>
</div>
} @else {
@if (!this.canWithdraw) {
<div class="modal-header">
{{'item.qa.reinstate.modal.header' | translate}}
<h4 id="modal-title" class="modal-title h4 mb-0">{{'item.qa.reinstate.modal.header' | translate}}</h4>
<button type="button" class="btn-close" (click)="onModalClose()" aria-label="Close">
</button>
</div>
Expand Down Expand Up @@ -46,7 +46,7 @@
</div>
</div>
} @else {
<div class="modal-header">{{'item.qa.withdrawn.modal.submitted.header' | translate}}</div>
<div class="modal-header"><h4 id="modal-title" class="modal-title h4 mb-0">{{'item.qa.withdrawn.modal.submitted.header' | translate}}</h4></div>
<div class="modal-body">
<div class="d-flex justify-content-center">
<ds-loading [showMessage]="false"></ds-loading>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<div>
<div class="modal-header">{{'dso-selector.'+ action + '.' + objectType.toString().toLowerCase() + '.head' | translate}}
<div class="modal-header">
<h4 id="modal-title" class="modal-title h4 mb-0">{{'dso-selector.'+ action + '.' + objectType.toString().toLowerCase() + '.head' | translate}}</h4>
<button type="button" class="btn-close" (click)="close()" aria-label="Close">
</button>
</div>
<div class="modal-body">
<div class="modal-body">
@if (header) {
<span class="h5 px-2">{{header | translate}}</span>
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<div>
<div class="modal-header">{{'dso-selector.'+ action + '.' + objectType.toString().toLowerCase() + '.head' | translate}}
<div class="modal-header">
<h4 id="modal-title" class="modal-title h4 mb-0">{{'dso-selector.'+ action + '.' + objectType.toString().toLowerCase() + '.head' | translate}}</h4>
<button type="button" class="btn-close" (click)="close()" aria-label="Close">
</button>
</div>
<div class="modal-body">
<div class="modal-body">
@if ((isAdmin$ | async)) {
<div data-test="admin-div">
<button class="btn btn-outline-primary btn-lg btn-block w-100" (click)="selectObject(undefined)">{{'dso-selector.create.community.top-level' | translate}}</button>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<div>
<div class="modal-header">{{'dso-selector.'+ action + '.' + objectType.toString().toLowerCase() + '.head' | translate}}
<div class="modal-header">
<h4 id="modal-title" class="modal-title h4 mb-0">{{'dso-selector.'+ action + '.' + objectType.toString().toLowerCase() + '.head' | translate}}</h4>
<button type="button" class="btn-close" (click)="close()" aria-label="Close">
</button>
</div>
<div class="modal-body">
<div class="modal-body">
@if (header) {
<span class="h5 px-2">{{header | translate}}</span>
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<div>
<div class="modal-header">{{'dso-selector.'+ action + '.' + objectType.toString().toLowerCase() + '.head' | translate}}
<div class="modal-header">
<h4 id="modal-title" class="modal-title h4 mb-0">{{'dso-selector.'+ action + '.' + objectType.toString().toLowerCase() + '.head' | translate}}</h4>
<button type="button" class="btn-close" (click)="close()" aria-label="Close">
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<div>
<div class="modal-header">{{'dso-selector.'+ action + '.' + objectType.toString().toLowerCase() + '.head' | translate}}
<div class="modal-header">
<h4 id="modal-title" class="modal-title h4 mb-0">{{'dso-selector.'+ action + '.' + objectType.toString().toLowerCase() + '.head' | translate}}</h4>
<button type="button" class="btn-close" (click)="close()" aria-label="Close">
</button>
</div>
<div class="modal-body">
<div class="modal-body">
@if (header) {
<span class="h5 px-2">{{header | translate}}</span>
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<div>
<div class="modal-header">{{'dso-selector.'+ action + '.' + objectType.toString().toLowerCase() + '.head' | translate}}
<div class="modal-header">
<h4 id="modal-title" class="modal-title h4 mb-0">{{'dso-selector.'+ action + '.' + objectType.toString().toLowerCase() + '.head' | translate}}</h4>
<button type="button" class="btn-close" (click)="close()" aria-label="Close">
</button>
</div>
<div class="modal-body">
<div class="modal-body">
@if (header) {
<span class="h5 px-2">{{header | translate}}</span>
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<div>
<div class="modal-header">{{'dso-selector.'+ action + '.' + objectType.toString().toLowerCase() + '.head' | translate}}
<div class="modal-header">
<h4 id="modal-title" class="modal-title h4 mb-0">{{'dso-selector.'+ action + '.' + objectType.toString().toLowerCase() + '.head' | translate}}</h4>
<button type="button" class="btn-close" (click)="close()" aria-label="Close">
</button>
</div>
<div class="modal-body">
<div class="modal-body">
@if (header) {
<span class="h5 px-2">{{header | translate}}</span>
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">{{ getHeader() }}</h5>
<h4 id="modal-title" class="modal-title">{{ getHeader() }}</h4>
</div>
<div class="modal-body">

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="modal-header">
<h4 class="modal-title">{{'vocabulary-treeview.header' | translate}}</h4>
<h4 id="modal-title" class="modal-title">{{'vocabulary-treeview.header' | translate}}</h4>
<button type="button" class="btn-close" aria-label="Close" (click)="activeModal.dismiss('Cross click')">
</button>
</div>
Expand Down
3 changes: 2 additions & 1 deletion src/app/shared/idle-modal/idle-modal.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<div>
<div class="modal-header" id="idle-modal.header">{{ "idle-modal.header" | translate }}
<div class="modal-header">
<h4 id="idle-modal.header" class="modal-title h4 mb-0">{{ "idle-modal.header" | translate }}</h4>
<button type="button" class="btn-close" (click)="closePressed()" aria-label="Close">
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<ng-template #rejectModal let-c="close" let-d="dismiss">
<div class="modal-header">
<h4 class="modal-title">{{'submission.workflow.tasks.claimed.reject.reason.title' | translate}}</h4>
<h4 id="modal-title" class="modal-title">{{'submission.workflow.tasks.claimed.reject.reason.title' | translate}}</h4>
<button type="button"
class="btn-close"
aria-label="Close"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

<ng-template #content let-c="close" let-d="dismiss">
<div class="modal-header">
<div class="modal-title text-danger h4">{{'submission.general.discard.confirm.title' | translate}}</div>
<h4 id="modal-title" class="modal-title text-danger h4">{{'submission.general.discard.confirm.title' | translate}}</h4>
<button type="button" id="delete_close" class="btn-close" aria-label="Close" (click)="d('cancel')">
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@

<ng-template #content let-modal>
<div class="modal-header">
<h4 class="modal-title" id="modal-basic-title">{{ 'resource-policies.form.eperson-group-list.modal.header' | translate }}</h4>
<h4 class="modal-title" id="modal-title">{{ 'resource-policies.form.eperson-group-list.modal.header' | translate }}</h4>
<button type="button" class="btn-close" aria-label="Close" (click)="modal.close()">
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<div>
<div class="modal-header">{{'dso-selector.'+ action + '.' + objectType.toString().toLowerCase() + '.head' | translate}}
<div class="modal-header">
<h4 id="modal-title" class="modal-title h4 mb-0">{{'dso-selector.'+ action + '.' + objectType.toString().toLowerCase() + '.head' | translate}}</h4>
<button type="button" class="btn-close" (click)="selectObject(undefined)" aria-label="Close">
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@if (subscriptionForm) {
<form [formGroup]="subscriptionForm" (ngSubmit)="submit()" data-test="subscription-form">
<div class="modal-header">
<h4 class="modal-title">{{'subscriptions.modal.title' | translate}}</h4>
<h4 id="modal-title" class="modal-title">{{'subscriptions.modal.title' | translate}}</h4>
<button type="button" class="btn-close" aria-label="Close" (click)="activeModal.close()">
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@

<ng-template #content let-c="close" let-d="dismiss">
<div class="modal-header">
<h4 class="modal-title text-danger">{{'submission.general.discard.confirm.title' | translate}}</h4>
<h4 id="modal-title" class="modal-title text-danger">{{'submission.general.discard.confirm.title' | translate}}</h4>
<button type="button" class="btn-close" aria-label="Close" (click)="d('cancel')">
</button>
</div>
Expand Down
Loading
Loading