diff --git a/src/app/access-control/group-registry/group-form/members-list/members-list.component.ts b/src/app/access-control/group-registry/group-form/members-list/members-list.component.ts
index 9b123ae4470..22934394c8a 100644
--- a/src/app/access-control/group-registry/group-form/members-list/members-list.component.ts
+++ b/src/app/access-control/group-registry/group-form/members-list/members-list.component.ts
@@ -54,6 +54,7 @@ import {
getFirstCompletedRemoteData,
getRemoteDataPayload,
} from '../../../../core/shared/operators';
+import { BtnDisabledDirective } from '../../../../shared/btn-disabled.directive';
import { ContextHelpDirective } from '../../../../shared/context-help.directive';
import { NotificationsService } from '../../../../shared/notifications/notifications.service';
import { PaginationComponent } from '../../../../shared/pagination/pagination.component';
@@ -113,6 +114,7 @@ export interface EPersonListActionConfig {
RouterLink,
NgClass,
NgForOf,
+ BtnDisabledDirective,
],
standalone: true,
})
diff --git a/src/app/access-control/group-registry/groups-registry.component.html b/src/app/access-control/group-registry/groups-registry.component.html
index c2d998d9541..4150e2560c5 100644
--- a/src/app/access-control/group-registry/groups-registry.component.html
+++ b/src/app/access-control/group-registry/groups-registry.component.html
@@ -69,7 +69,7 @@ {{messagePrefix + 'search.head' | tra
{
imports: [CommonModule, NgbModule, FormsModule, ReactiveFormsModule, BrowserModule,
TranslateModule.forRoot(),
GroupsRegistryComponent,
+ BtnDisabledDirective,
],
providers: [GroupsRegistryComponent,
{ provide: DSONameService, useValue: new DSONameServiceMock() },
@@ -278,7 +280,8 @@ describe('GroupsRegistryComponent', () => {
const editButtonsFound = fixture.debugElement.queryAll(By.css('#groups tr td:nth-child(5) button.btn-edit'));
expect(editButtonsFound.length).toEqual(2);
editButtonsFound.forEach((editButtonFound) => {
- expect(editButtonFound.nativeElement.disabled).toBeFalse();
+ expect(editButtonFound.nativeElement.getAttribute('aria-disabled')).toBeNull();
+ expect(editButtonFound.nativeElement.classList.contains('disabled')).toBeFalse();
});
});
@@ -312,7 +315,8 @@ describe('GroupsRegistryComponent', () => {
const editButtonsFound = fixture.debugElement.queryAll(By.css('#groups tr td:nth-child(5) button.btn-edit'));
expect(editButtonsFound.length).toEqual(2);
editButtonsFound.forEach((editButtonFound) => {
- expect(editButtonFound.nativeElement.disabled).toBeFalse();
+ expect(editButtonFound.nativeElement.getAttribute('aria-disabled')).toBeNull();
+ expect(editButtonFound.nativeElement.classList.contains('disabled')).toBeFalse();
});
});
});
@@ -331,7 +335,8 @@ describe('GroupsRegistryComponent', () => {
const editButtonsFound = fixture.debugElement.queryAll(By.css('#groups tr td:nth-child(5) button.btn-edit'));
expect(editButtonsFound.length).toEqual(2);
editButtonsFound.forEach((editButtonFound) => {
- expect(editButtonFound.nativeElement.disabled).toBeTrue();
+ expect(editButtonFound.nativeElement.getAttribute('aria-disabled')).toBe('true');
+ expect(editButtonFound.nativeElement.classList.contains('disabled')).toBeTrue();
});
});
});
diff --git a/src/app/access-control/group-registry/groups-registry.component.ts b/src/app/access-control/group-registry/groups-registry.component.ts
index dec3dc955d9..07b7317a1e2 100644
--- a/src/app/access-control/group-registry/groups-registry.component.ts
+++ b/src/app/access-control/group-registry/groups-registry.component.ts
@@ -62,6 +62,7 @@ import {
getRemoteDataPayload,
} from '../../core/shared/operators';
import { PageInfo } from '../../core/shared/page-info.model';
+import { BtnDisabledDirective } from '../../shared/btn-disabled.directive';
import { hasValue } from '../../shared/empty.util';
import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component';
import { NotificationsService } from '../../shared/notifications/notifications.service';
@@ -84,6 +85,7 @@ import { followLink } from '../../shared/utils/follow-link-config.model';
NgSwitchCase,
NgbTooltipModule,
NgForOf,
+ BtnDisabledDirective,
],
standalone: true,
})
diff --git a/src/app/admin/admin-reports/filtered-items/filtered-items.component.html b/src/app/admin/admin-reports/filtered-items/filtered-items.component.html
index 4b6679bdbca..a765c4a1909 100644
--- a/src/app/admin/admin-reports/filtered-items/filtered-items.component.html
+++ b/src/app/admin/admin-reports/filtered-items/filtered-items.component.html
@@ -54,7 +54,7 @@
@@ -158,8 +158,8 @@
-
diff --git a/src/app/shared/subscriptions/subscription-view/subscription-view.component.ts b/src/app/shared/subscriptions/subscription-view/subscription-view.component.ts
index 001a2ed687a..f940e697950 100644
--- a/src/app/shared/subscriptions/subscription-view/subscription-view.component.ts
+++ b/src/app/shared/subscriptions/subscription-view/subscription-view.component.ts
@@ -19,6 +19,7 @@ import { getDSORoute } from 'src/app/app-routing-paths';
import { DSONameService } from '../../../core/breadcrumbs/dso-name.service';
import { DSpaceObject } from '../../../core/shared/dspace-object.model';
+import { BtnDisabledDirective } from '../../btn-disabled.directive';
import { ConfirmationModalComponent } from '../../confirmation-modal/confirmation-modal.component';
import { hasValue } from '../../empty.util';
import { ThemedTypeBadgeComponent } from '../../object-collection/shared/badges/type-badge/themed-type-badge.component';
@@ -32,7 +33,7 @@ import { SubscriptionsDataService } from '../subscriptions-data.service';
templateUrl: './subscription-view.component.html',
styleUrls: ['./subscription-view.component.scss'],
standalone: true,
- imports: [NgIf, ThemedTypeBadgeComponent, RouterLink, NgFor, TranslateModule],
+ imports: [NgIf, ThemedTypeBadgeComponent, RouterLink, NgFor, TranslateModule, BtnDisabledDirective],
})
/**
* Table row representing a subscription that displays all information and action buttons to manage it
diff --git a/src/app/shared/upload/uploader/uploader.component.html b/src/app/shared/upload/uploader/uploader.component.html
index 4c1db13d133..ae7c07bbab7 100644
--- a/src/app/shared/upload/uploader/uploader.component.html
+++ b/src/app/shared/upload/uploader/uploader.component.html
@@ -35,7 +35,7 @@
{{'uploader.queue-length' | translate}}: {{ uploader?.queue?.length }} | {{ uploader?.queue[0]?.file.name }}
-
+
diff --git a/src/app/shared/upload/uploader/uploader.component.ts b/src/app/shared/upload/uploader/uploader.component.ts
index fbab09be3e3..fbafe811ebc 100644
--- a/src/app/shared/upload/uploader/uploader.component.ts
+++ b/src/app/shared/upload/uploader/uploader.component.ts
@@ -27,6 +27,7 @@ import {
XSRF_REQUEST_HEADER,
XSRF_RESPONSE_HEADER,
} from '../../../core/xsrf/xsrf.constants';
+import { BtnDisabledDirective } from '../../btn-disabled.directive';
import {
hasValue,
isNotEmpty,
@@ -42,7 +43,7 @@ import { UploaderProperties } from './uploader-properties.model';
changeDetection: ChangeDetectionStrategy.Default,
encapsulation: ViewEncapsulation.Emulated,
standalone: true,
- imports: [TranslateModule, FileUploadModule, CommonModule],
+ imports: [TranslateModule, FileUploadModule, CommonModule, BtnDisabledDirective],
})
export class UploaderComponent implements OnInit, AfterViewInit {
diff --git a/src/app/submission/form/collection/submission-form-collection.component.html b/src/app/submission/form/collection/submission-form-collection.component.html
index 16370a5873b..db33afc76ac 100644
--- a/src/app/submission/form/collection/submission-form-collection.component.html
+++ b/src/app/submission/form/collection/submission-form-collection.component.html
@@ -25,7 +25,7 @@
class="btn btn-outline-primary"
(blur)="onClose()"
(click)="onClose()"
- [disabled]="(processingChange$ | async) || collectionModifiable === false || isReadonly"
+ [dsBtnDisabled]="(processingChange$ | async) || collectionModifiable === false || isReadonly"
ngbDropdownToggle>
{{ selectedCollectionName$ | async }}
diff --git a/src/app/submission/form/collection/submission-form-collection.component.spec.ts b/src/app/submission/form/collection/submission-form-collection.component.spec.ts
index 540c2ba561a..3a5ae8a18d3 100644
--- a/src/app/submission/form/collection/submission-form-collection.component.spec.ts
+++ b/src/app/submission/form/collection/submission-form-collection.component.spec.ts
@@ -30,6 +30,7 @@ import { JsonPatchOperationPathCombiner } from '../../../core/json-patch/builder
import { JsonPatchOperationsBuilder } from '../../../core/json-patch/builder/json-patch-operations-builder';
import { Collection } from '../../../core/shared/collection.model';
import { SubmissionJsonPatchOperationsService } from '../../../core/submission/submission-json-patch-operations.service';
+import { BtnDisabledDirective } from '../../../shared/btn-disabled.directive';
import { ThemedCollectionDropdownComponent } from '../../../shared/collection-dropdown/themed-collection-dropdown.component';
import { DSONameServiceMock } from '../../../shared/mocks/dso-name.service.mock';
import {
@@ -152,6 +153,7 @@ describe('SubmissionFormCollectionComponent Component', () => {
TranslateModule.forRoot(),
SubmissionFormCollectionComponent,
TestComponent,
+ BtnDisabledDirective,
],
providers: [
{ provide: DSONameService, useValue: new DSONameServiceMock() },
@@ -275,7 +277,8 @@ describe('SubmissionFormCollectionComponent Component', () => {
it('the dropdown button should be disabled when isReadonly is true', () => {
comp.isReadonly = true;
fixture.detectChanges();
- expect(dropdowBtn.nativeNode.attributes.disabled).toBeDefined();
+ expect(dropdowBtn.nativeNode.getAttribute('aria-disabled')).toBe('true');
+ expect(dropdowBtn.nativeNode.classList.contains('disabled')).toBeTrue();
});
it('should be simulated when the drop-down menu is closed', () => {
diff --git a/src/app/submission/form/collection/submission-form-collection.component.ts b/src/app/submission/form/collection/submission-form-collection.component.ts
index 2aec1c9e30b..1736b474d5f 100644
--- a/src/app/submission/form/collection/submission-form-collection.component.ts
+++ b/src/app/submission/form/collection/submission-form-collection.component.ts
@@ -34,6 +34,7 @@ import { Collection } from '../../../core/shared/collection.model';
import { getFirstSucceededRemoteDataPayload } from '../../../core/shared/operators';
import { SubmissionObject } from '../../../core/submission/models/submission-object.model';
import { SubmissionJsonPatchOperationsService } from '../../../core/submission/submission-json-patch-operations.service';
+import { BtnDisabledDirective } from '../../../shared/btn-disabled.directive';
import { CollectionDropdownComponent } from '../../../shared/collection-dropdown/collection-dropdown.component';
import { ThemedCollectionDropdownComponent } from '../../../shared/collection-dropdown/themed-collection-dropdown.component';
import {
@@ -57,6 +58,7 @@ import { SubmissionService } from '../../submission.service';
TranslateModule,
NgbDropdownModule,
ThemedCollectionDropdownComponent,
+ BtnDisabledDirective,
],
})
export class SubmissionFormCollectionComponent implements OnDestroy, OnChanges, OnInit {
diff --git a/src/app/submission/form/footer/submission-form-footer.component.html b/src/app/submission/form/footer/submission-form-footer.component.html
index f1162cea4de..c860fb557b2 100644
--- a/src/app/submission/form/footer/submission-form-footer.component.html
+++ b/src/app/submission/form/footer/submission-form-footer.component.html
@@ -5,7 +5,7 @@
id="discard"
[attr.data-test]="'discard' | dsBrowserOnly"
class="btn btn-danger"
- [disabled]="(processingSaveStatus | async) || (processingDepositStatus | async)"
+ [dsBtnDisabled]="(processingSaveStatus | async) || (processingDepositStatus | async)"
(click)="$event.preventDefault();confirmDiscard(content)">
{{'submission.general.discard.submit' | translate}}
@@ -28,7 +28,7 @@
class="btn btn-secondary"
id="save"
[attr.data-test]="'save' | dsBrowserOnly"
- [disabled]="(processingSaveStatus | async) || (hasUnsavedModification | async) !== true"
+ [dsBtnDisabled]="(processingSaveStatus | async) || (hasUnsavedModification | async) !== true"
(click)="save($event)">
{{'submission.general.save' | translate}}
@@ -38,7 +38,7 @@
class="btn"
id="saveForLater"
[attr.data-test]="'save-for-later' | dsBrowserOnly"
- [disabled]="(processingSaveStatus | async) || (processingDepositStatus | async)"
+ [dsBtnDisabled]="(processingSaveStatus | async) || (processingDepositStatus | async)"
(click)="saveLater($event)">
{{'submission.general.save-later' | translate}}
@@ -47,7 +47,7 @@
id="deposit"
[attr.data-test]="'deposit' | dsBrowserOnly"
class="btn btn-success"
- [disabled]="(processingSaveStatus | async) || (processingDepositStatus | async)"
+ [dsBtnDisabled]="(processingSaveStatus | async) || (processingDepositStatus | async)"
(click)="deposit($event)">
{{'submission.general.deposit' | translate}}
diff --git a/src/app/submission/form/footer/submission-form-footer.component.spec.ts b/src/app/submission/form/footer/submission-form-footer.component.spec.ts
index 4c6d04c9701..82bc309cc81 100644
--- a/src/app/submission/form/footer/submission-form-footer.component.spec.ts
+++ b/src/app/submission/form/footer/submission-form-footer.component.spec.ts
@@ -25,6 +25,7 @@ import { of as observableOf } from 'rxjs';
import { TestScheduler } from 'rxjs/testing';
import { SubmissionRestService } from '../../../core/submission/submission-rest.service';
+import { BtnDisabledDirective } from '../../../shared/btn-disabled.directive';
import { mockSubmissionId } from '../../../shared/mocks/submission.mock';
import { SubmissionRestServiceStub } from '../../../shared/testing/submission-rest-service.stub';
import { SubmissionServiceStub } from '../../../shared/testing/submission-service.stub';
@@ -51,6 +52,7 @@ describe('SubmissionFormFooterComponent', () => {
TranslateModule.forRoot(),
SubmissionFormFooterComponent,
TestComponent,
+ BtnDisabledDirective,
],
providers: [
{ provide: SubmissionService, useValue: submissionServiceStub },
@@ -227,7 +229,8 @@ describe('SubmissionFormFooterComponent', () => {
fixture.detectChanges();
const depositBtn: any = fixture.debugElement.query(By.css('.btn-success'));
- expect(depositBtn.nativeElement.disabled).toBeFalsy();
+ expect(depositBtn.nativeElement.getAttribute('aria-disabled')).toBe('false');
+ expect(depositBtn.nativeElement.classList.contains('disabled')).toBeFalse();
});
it('should not have deposit button disabled when submission is valid', () => {
@@ -236,7 +239,8 @@ describe('SubmissionFormFooterComponent', () => {
fixture.detectChanges();
const depositBtn: any = fixture.debugElement.query(By.css('.btn-success'));
- expect(depositBtn.nativeElement.disabled).toBeFalsy();
+ expect(depositBtn.nativeElement.getAttribute('aria-disabled')).toBe('false');
+ expect(depositBtn.nativeElement.classList.contains('disabled')).toBeFalse();
});
it('should disable save button when all modifications had been saved', () => {
@@ -244,7 +248,8 @@ describe('SubmissionFormFooterComponent', () => {
fixture.detectChanges();
const saveBtn: any = fixture.debugElement.query(By.css('#save'));
- expect(saveBtn.nativeElement.disabled).toBeTruthy();
+ expect(saveBtn.nativeElement.getAttribute('aria-disabled')).toBe('true');
+ expect(saveBtn.nativeElement.classList.contains('disabled')).toBeTrue();
});
it('should enable save button when there are not saved modifications', () => {
@@ -252,7 +257,8 @@ describe('SubmissionFormFooterComponent', () => {
fixture.detectChanges();
const saveBtn: any = fixture.debugElement.query(By.css('#save'));
- expect(saveBtn.nativeElement.disabled).toBeFalsy();
+ expect(saveBtn.nativeElement.getAttribute('aria-disabled')).toBe('false');
+ expect(saveBtn.nativeElement.classList.contains('disabled')).toBeFalse();
});
});
diff --git a/src/app/submission/form/footer/submission-form-footer.component.ts b/src/app/submission/form/footer/submission-form-footer.component.ts
index 712a944a844..8645003783c 100644
--- a/src/app/submission/form/footer/submission-form-footer.component.ts
+++ b/src/app/submission/form/footer/submission-form-footer.component.ts
@@ -15,6 +15,7 @@ import { map } from 'rxjs/operators';
import { SubmissionRestService } from '../../../core/submission/submission-rest.service';
import { SubmissionScopeType } from '../../../core/submission/submission-scope-type';
+import { BtnDisabledDirective } from '../../../shared/btn-disabled.directive';
import { isNotEmpty } from '../../../shared/empty.util';
import { BrowserOnlyPipe } from '../../../shared/utils/browser-only.pipe';
import { SubmissionService } from '../../submission.service';
@@ -27,7 +28,7 @@ import { SubmissionService } from '../../submission.service';
styleUrls: ['./submission-form-footer.component.scss'],
templateUrl: './submission-form-footer.component.html',
standalone: true,
- imports: [CommonModule, BrowserOnlyPipe, TranslateModule],
+ imports: [CommonModule, BrowserOnlyPipe, TranslateModule, BtnDisabledDirective],
})
export class SubmissionFormFooterComponent implements OnChanges {
diff --git a/src/app/submission/form/section-add/submission-form-section-add.component.html b/src/app/submission/form/section-add/submission-form-section-add.component.html
index 0c7035c7f82..563044d270a 100644
--- a/src/app/submission/form/section-add/submission-form-section-add.component.html
+++ b/src/app/submission/form/section-add/submission-form-section-add.component.html
@@ -6,7 +6,7 @@
{{ 'submission.sections.general.add-more' | translate }}
diff --git a/src/app/submission/form/section-add/submission-form-section-add.component.ts b/src/app/submission/form/section-add/submission-form-section-add.component.ts
index 4cf10e55d83..eeeda893f19 100644
--- a/src/app/submission/form/section-add/submission-form-section-add.component.ts
+++ b/src/app/submission/form/section-add/submission-form-section-add.component.ts
@@ -9,6 +9,7 @@ import { TranslateModule } from '@ngx-translate/core';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
+import { BtnDisabledDirective } from '../../../shared/btn-disabled.directive';
import { HostWindowService } from '../../../shared/host-window.service';
import { SectionDataObject } from '../../sections/models/section-data.model';
import { SectionsService } from '../../sections/sections.service';
@@ -22,7 +23,7 @@ import { SubmissionService } from '../../submission.service';
styleUrls: ['./submission-form-section-add.component.scss'],
templateUrl: './submission-form-section-add.component.html',
standalone: true,
- imports: [CommonModule, TranslateModule, NgbDropdownModule],
+ imports: [CommonModule, TranslateModule, NgbDropdownModule, BtnDisabledDirective],
})
export class SubmissionFormSectionAddComponent implements OnInit {
diff --git a/src/app/submission/import-external/import-external-searchbar/submission-import-external-searchbar.component.html b/src/app/submission/import-external/import-external-searchbar/submission-import-external-searchbar.component.html
index 7b5a2004d71..f5bde4e81ab 100644
--- a/src/app/submission/import-external/import-external-searchbar/submission-import-external-searchbar.component.html
+++ b/src/app/submission/import-external/import-external-searchbar/submission-import-external-searchbar.component.html
@@ -23,6 +23,6 @@
{{'submission.import-external.source.loading' | translate}}
- {{'submission.import-external.search.button' | translate}}
+ {{'submission.import-external.search.button' | translate}}
diff --git a/src/app/submission/import-external/import-external-searchbar/submission-import-external-searchbar.component.ts b/src/app/submission/import-external/import-external-searchbar/submission-import-external-searchbar.component.ts
index aace4de79a8..eb7a703cc2d 100644
--- a/src/app/submission/import-external/import-external-searchbar/submission-import-external-searchbar.component.ts
+++ b/src/app/submission/import-external/import-external-searchbar/submission-import-external-searchbar.component.ts
@@ -36,6 +36,7 @@ import {
getFirstSucceededRemoteDataPayload,
} from '../../../core/shared/operators';
import { PageInfo } from '../../../core/shared/page-info.model';
+import { BtnDisabledDirective } from '../../../shared/btn-disabled.directive';
import { hasValue } from '../../../shared/empty.util';
import { HostWindowService } from '../../../shared/host-window.service';
import { createSuccessfulRemoteDataObject } from '../../../shared/remote-data.utils';
@@ -70,6 +71,7 @@ export interface ExternalSourceData {
InfiniteScrollModule,
NgbDropdownModule,
FormsModule,
+ BtnDisabledDirective,
],
standalone: true,
})
diff --git a/src/app/submission/sections/cc-license/submission-section-cc-licenses.component.ts b/src/app/submission/sections/cc-license/submission-section-cc-licenses.component.ts
index cc1925a4a66..a633e640abf 100644
--- a/src/app/submission/sections/cc-license/submission-section-cc-licenses.component.ts
+++ b/src/app/submission/sections/cc-license/submission-section-cc-licenses.component.ts
@@ -46,6 +46,7 @@ import {
import { WorkspaceitemSectionCcLicenseObject } from '../../../core/submission/models/workspaceitem-section-cc-license.model';
import { SubmissionCcLicenseDataService } from '../../../core/submission/submission-cc-license-data.service';
import { SubmissionCcLicenseUrlDataService } from '../../../core/submission/submission-cc-license-url-data.service';
+import { BtnDisabledDirective } from '../../../shared/btn-disabled.directive';
import { DsSelectComponent } from '../../../shared/ds-select/ds-select.component';
import { isNotEmpty } from '../../../shared/empty.util';
import { ThemedLoadingComponent } from '../../../shared/loading/themed-loading.component';
@@ -73,6 +74,7 @@ import { SectionsType } from '../sections-type';
NgbDropdownModule,
FormsModule,
InfiniteScrollModule,
+ BtnDisabledDirective,
],
standalone: true,
})
diff --git a/src/app/submission/sections/upload/file/edit/section-upload-file-edit.component.html b/src/app/submission/sections/upload/file/edit/section-upload-file-edit.component.html
index 0cb79e51cb0..b03504c6beb 100644
--- a/src/app/submission/sections/upload/file/edit/section-upload-file-edit.component.html
+++ b/src/app/submission/sections/upload/file/edit/section-upload-file-edit.component.html
@@ -1,7 +1,7 @@
diff --git a/src/app/submission/sections/upload/file/edit/section-upload-file-edit.component.ts b/src/app/submission/sections/upload/file/edit/section-upload-file-edit.component.ts
index 24488d1adb3..79b3d3a5652 100644
--- a/src/app/submission/sections/upload/file/edit/section-upload-file-edit.component.ts
+++ b/src/app/submission/sections/upload/file/edit/section-upload-file-edit.component.ts
@@ -38,6 +38,7 @@ import { JsonPatchOperationPathCombiner } from '../../../../../core/json-patch/b
import { JsonPatchOperationsBuilder } from '../../../../../core/json-patch/builder/json-patch-operations-builder';
import { WorkspaceitemSectionUploadFileObject } from '../../../../../core/submission/models/workspaceitem-section-upload-file.model';
import { SubmissionJsonPatchOperationsService } from '../../../../../core/submission/submission-json-patch-operations.service';
+import { BtnDisabledDirective } from '../../../../../shared/btn-disabled.directive';
import { dateToISOFormat } from '../../../../../shared/date.util';
import {
hasNoValue,
@@ -80,6 +81,7 @@ import {
FormComponent,
NgIf,
TranslateModule,
+ BtnDisabledDirective,
],
standalone: true,
})
diff --git a/src/app/submission/sections/upload/file/section-upload-file.component.html b/src/app/submission/sections/upload/file/section-upload-file.component.html
index 4698fdf68a6..cd045426769 100644
--- a/src/app/submission/sections/upload/file/section-upload-file.component.html
+++ b/src/app/submission/sections/upload/file/section-upload-file.component.html
@@ -35,7 +35,7 @@
diff --git a/src/app/submission/sections/upload/file/section-upload-file.component.ts b/src/app/submission/sections/upload/file/section-upload-file.component.ts
index a0519f6c858..09ea3cb1122 100644
--- a/src/app/submission/sections/upload/file/section-upload-file.component.ts
+++ b/src/app/submission/sections/upload/file/section-upload-file.component.ts
@@ -28,6 +28,7 @@ import { JsonPatchOperationsBuilder } from '../../../../core/json-patch/builder/
import { Bitstream } from '../../../../core/shared/bitstream.model';
import { WorkspaceitemSectionUploadFileObject } from '../../../../core/submission/models/workspaceitem-section-upload-file.model';
import { SubmissionJsonPatchOperationsService } from '../../../../core/submission/submission-json-patch-operations.service';
+import { BtnDisabledDirective } from '../../../../shared/btn-disabled.directive';
import {
hasValue,
isNotUndefined,
@@ -54,6 +55,7 @@ import { SubmissionSectionUploadFileViewComponent } from './view/section-upload-
AsyncPipe,
ThemedFileDownloadLinkComponent,
FileSizePipe,
+ BtnDisabledDirective,
],
standalone: true,
})
diff --git a/src/app/system-wide-alert/alert-form/system-wide-alert-form.component.html b/src/app/system-wide-alert/alert-form/system-wide-alert-form.component.html
index 770f465a4bc..dc2699b6d1b 100644
--- a/src/app/system-wide-alert/alert-form/system-wide-alert-form.component.html
+++ b/src/app/system-wide-alert/alert-form/system-wide-alert-form.component.html
@@ -87,8 +87,8 @@
{{ 'system-wide-alert.form.cancel' | translate }}
-
+
{{ 'system-wide-alert.form.save' | translate }}
-
\ No newline at end of file
+
diff --git a/src/app/system-wide-alert/alert-form/system-wide-alert-form.component.ts b/src/app/system-wide-alert/alert-form/system-wide-alert-form.component.ts
index b30e864fa12..ea1c0a55f0c 100644
--- a/src/app/system-wide-alert/alert-form/system-wide-alert-form.component.ts
+++ b/src/app/system-wide-alert/alert-form/system-wide-alert-form.component.ts
@@ -43,6 +43,7 @@ import { RemoteData } from '../../core/data/remote-data';
import { RequestService } from '../../core/data/request.service';
import { SystemWideAlertDataService } from '../../core/data/system-wide-alert-data.service';
import { getFirstCompletedRemoteData } from '../../core/shared/operators';
+import { BtnDisabledDirective } from '../../shared/btn-disabled.directive';
import {
hasValue,
isNotEmpty,
@@ -59,7 +60,7 @@ import { SystemWideAlert } from '../system-wide-alert.model';
styleUrls: ['./system-wide-alert-form.component.scss'],
templateUrl: './system-wide-alert-form.component.html',
standalone: true,
- imports: [FormsModule, ReactiveFormsModule, UiSwitchModule, NgIf, NgbDatepickerModule, NgbTimepickerModule, AsyncPipe, TranslateModule],
+ imports: [FormsModule, ReactiveFormsModule, UiSwitchModule, NgIf, NgbDatepickerModule, NgbTimepickerModule, AsyncPipe, TranslateModule, BtnDisabledDirective],
})
export class SystemWideAlertFormComponent implements OnInit {
diff --git a/src/app/workflowitems-edit-page/advanced-workflow-action/advanced-workflow-action-select-reviewer/reviewers-list/reviewers-list.component.ts b/src/app/workflowitems-edit-page/advanced-workflow-action/advanced-workflow-action-select-reviewer/reviewers-list/reviewers-list.component.ts
index 5ae3a13f313..c43fabdb83a 100644
--- a/src/app/workflowitems-edit-page/advanced-workflow-action/advanced-workflow-action-select-reviewer/reviewers-list/reviewers-list.component.ts
+++ b/src/app/workflowitems-edit-page/advanced-workflow-action/advanced-workflow-action-select-reviewer/reviewers-list/reviewers-list.component.ts
@@ -44,6 +44,7 @@ import { EpersonDtoModel } from '../../../../core/eperson/models/eperson-dto.mod
import { Group } from '../../../../core/eperson/models/group.model';
import { PaginationService } from '../../../../core/pagination/pagination.service';
import { getFirstSucceededRemoteDataPayload } from '../../../../core/shared/operators';
+import { BtnDisabledDirective } from '../../../../shared/btn-disabled.directive';
import { ContextHelpDirective } from '../../../../shared/context-help.directive';
import { hasValue } from '../../../../shared/empty.util';
import { NotificationsService } from '../../../../shared/notifications/notifications.service';
@@ -76,6 +77,7 @@ enum SubKey {
RouterLink,
NgClass,
NgForOf,
+ BtnDisabledDirective,
],
})
export class ReviewersListComponent extends MembersListComponent implements OnInit, OnChanges, OnDestroy {
diff --git a/src/styles/_global-styles.scss b/src/styles/_global-styles.scss
index 4934ec3d350..b1a6c62beec 100644
--- a/src/styles/_global-styles.scss
+++ b/src/styles/_global-styles.scss
@@ -463,6 +463,17 @@ ngb-accordion {
color: darken($danger, 22%);
}
+// An element that is disabled should not have focus styles to avoid confusion
+// It however is still focusable for screen readers and keyboard navigation
+.disabled {
+ pointer-events: none;
+}
+
+.disabled:focus {
+ outline: none;
+ box-shadow: none;
+}
+
// Margin utility classes based on DSpace content spacing
.mt-cs { margin-top: var(--ds-content-spacing); }
.mb-cs { margin-bottom: var(--ds-content-spacing); }
diff --git a/src/themes/custom/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.ts b/src/themes/custom/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.ts
index a7437c04081..f74a73a4b88 100644
--- a/src/themes/custom/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.ts
+++ b/src/themes/custom/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.ts
@@ -13,6 +13,7 @@ import { DsoEditMetadataValueComponent } from '../../../../../app/dso-shared/dso
import { DsoEditMetadataValueHeadersComponent } from '../../../../../app/dso-shared/dso-edit-metadata/dso-edit-metadata-value-headers/dso-edit-metadata-value-headers.component';
import { MetadataFieldSelectorComponent } from '../../../../../app/dso-shared/dso-edit-metadata/metadata-field-selector/metadata-field-selector.component';
import { AlertComponent } from '../../../../../app/shared/alert/alert.component';
+import { BtnDisabledDirective } from '../../../../../app/shared/btn-disabled.directive';
import { ThemedLoadingComponent } from '../../../../../app/shared/loading/themed-loading.component';
@Component({
@@ -22,7 +23,7 @@ import { ThemedLoadingComponent } from '../../../../../app/shared/loading/themed
// templateUrl: './dso-edit-metadata.component.html',
templateUrl: '../../../../../app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.html',
standalone: true,
- imports: [NgIf, DsoEditMetadataHeadersComponent, MetadataFieldSelectorComponent, DsoEditMetadataValueHeadersComponent, DsoEditMetadataValueComponent, NgFor, DsoEditMetadataFieldValuesComponent, AlertComponent, ThemedLoadingComponent, AsyncPipe, TranslateModule],
+ imports: [NgIf, DsoEditMetadataHeadersComponent, MetadataFieldSelectorComponent, DsoEditMetadataValueHeadersComponent, DsoEditMetadataValueComponent, NgFor, DsoEditMetadataFieldValuesComponent, AlertComponent, ThemedLoadingComponent, AsyncPipe, TranslateModule, BtnDisabledDirective],
})
export class DsoEditMetadataComponent extends BaseComponent {
}
diff --git a/src/themes/custom/app/forgot-password/forgot-password-form/forgot-password-form.component.ts b/src/themes/custom/app/forgot-password/forgot-password-form/forgot-password-form.component.ts
index 9656e7b85ce..37fb3834294 100644
--- a/src/themes/custom/app/forgot-password/forgot-password-form/forgot-password-form.component.ts
+++ b/src/themes/custom/app/forgot-password/forgot-password-form/forgot-password-form.component.ts
@@ -7,6 +7,7 @@ import { TranslateModule } from '@ngx-translate/core';
import { ForgotPasswordFormComponent as BaseComponent } from '../../../../../app/forgot-password/forgot-password-form/forgot-password-form.component';
import { ProfilePageSecurityFormComponent } from '../../../../../app/profile-page/profile-page-security-form/profile-page-security-form.component';
+import { BtnDisabledDirective } from '../../../../../app/shared/btn-disabled.directive';
import { BrowserOnlyPipe } from '../../../../../app/shared/utils/browser-only.pipe';
@Component({
@@ -22,6 +23,7 @@ import { BrowserOnlyPipe } from '../../../../../app/shared/utils/browser-only.pi
ProfilePageSecurityFormComponent,
AsyncPipe,
NgIf,
+ BtnDisabledDirective,
],
})
/**
diff --git a/src/themes/custom/app/info/end-user-agreement/end-user-agreement.component.ts b/src/themes/custom/app/info/end-user-agreement/end-user-agreement.component.ts
index 05f22522163..2b78006f650 100644
--- a/src/themes/custom/app/info/end-user-agreement/end-user-agreement.component.ts
+++ b/src/themes/custom/app/info/end-user-agreement/end-user-agreement.component.ts
@@ -4,6 +4,7 @@ import { TranslateModule } from '@ngx-translate/core';
import { EndUserAgreementComponent as BaseComponent } from '../../../../../app/info/end-user-agreement/end-user-agreement.component';
import { EndUserAgreementContentComponent } from '../../../../../app/info/end-user-agreement/end-user-agreement-content/end-user-agreement-content.component';
+import { BtnDisabledDirective } from '../../../../../app/shared/btn-disabled.directive';
@Component({
selector: 'ds-themed-end-user-agreement',
@@ -12,7 +13,7 @@ import { EndUserAgreementContentComponent } from '../../../../../app/info/end-us
// templateUrl: './end-user-agreement.component.html'
templateUrl: '../../../../../app/info/end-user-agreement/end-user-agreement.component.html',
standalone: true,
- imports: [EndUserAgreementContentComponent, FormsModule, TranslateModule],
+ imports: [EndUserAgreementContentComponent, FormsModule, TranslateModule, BtnDisabledDirective],
})
/**
diff --git a/src/themes/custom/app/info/feedback/feedback-form/feedback-form.component.ts b/src/themes/custom/app/info/feedback/feedback-form/feedback-form.component.ts
index b3cd90e73ed..38356671118 100644
--- a/src/themes/custom/app/info/feedback/feedback-form/feedback-form.component.ts
+++ b/src/themes/custom/app/info/feedback/feedback-form/feedback-form.component.ts
@@ -7,6 +7,7 @@ import {
import { TranslateModule } from '@ngx-translate/core';
import { FeedbackFormComponent as BaseComponent } from '../../../../../../app/info/feedback/feedback-form/feedback-form.component';
+import { BtnDisabledDirective } from '../../../../../../app/shared/btn-disabled.directive';
import { ErrorComponent } from '../../../../../../app/shared/error/error.component';
@Component({
@@ -16,7 +17,7 @@ import { ErrorComponent } from '../../../../../../app/shared/error/error.compone
// styleUrls: ['./feedback-form.component.scss'],
styleUrls: ['../../../../../../app/info/feedback/feedback-form/feedback-form.component.scss'],
standalone: true,
- imports: [FormsModule, ReactiveFormsModule, NgIf, ErrorComponent, TranslateModule],
+ imports: [FormsModule, ReactiveFormsModule, NgIf, ErrorComponent, TranslateModule, BtnDisabledDirective],
})
export class FeedbackFormComponent extends BaseComponent {
}
diff --git a/src/themes/custom/app/item-page/media-viewer/media-viewer-video/media-viewer-video.component.ts b/src/themes/custom/app/item-page/media-viewer/media-viewer-video/media-viewer-video.component.ts
index 5c6c7f35072..0efa0130640 100644
--- a/src/themes/custom/app/item-page/media-viewer/media-viewer-video/media-viewer-video.component.ts
+++ b/src/themes/custom/app/item-page/media-viewer/media-viewer-video/media-viewer-video.component.ts
@@ -7,6 +7,7 @@ import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';
import { TranslateModule } from '@ngx-translate/core';
import { MediaViewerVideoComponent as BaseComponent } from '../../../../../../app/item-page/media-viewer/media-viewer-video/media-viewer-video.component';
+import { BtnDisabledDirective } from '../../../../../../app/shared/btn-disabled.directive';
@Component({
selector: 'ds-themed-media-viewer-video',
@@ -20,6 +21,7 @@ import { MediaViewerVideoComponent as BaseComponent } from '../../../../../../ap
NgbDropdownModule,
TranslateModule,
NgIf,
+ BtnDisabledDirective,
],
})
export class MediaViewerVideoComponent extends BaseComponent {
diff --git a/src/themes/custom/app/register-email-form/register-email-form.component.ts b/src/themes/custom/app/register-email-form/register-email-form.component.ts
index 44426c527fd..d1f4a6d3ffe 100644
--- a/src/themes/custom/app/register-email-form/register-email-form.component.ts
+++ b/src/themes/custom/app/register-email-form/register-email-form.component.ts
@@ -12,13 +12,14 @@ import { AlertComponent } from 'src/app/shared/alert/alert.component';
import { GoogleRecaptchaComponent } from 'src/app/shared/google-recaptcha/google-recaptcha.component';
import { RegisterEmailFormComponent as BaseComponent } from '../../../../app/register-email-form/register-email-form.component';
+import { BtnDisabledDirective } from '../../../../app/shared/btn-disabled.directive';
@Component({
selector: 'ds-themed-register-email-form',
// templateUrl: './register-email-form.component.html',
templateUrl: '../../../../app/register-email-form/register-email-form.component.html',
standalone: true,
- imports: [NgIf, FormsModule, ReactiveFormsModule, AlertComponent, GoogleRecaptchaComponent, AsyncPipe, TranslateModule],
+ imports: [NgIf, FormsModule, ReactiveFormsModule, AlertComponent, GoogleRecaptchaComponent, AsyncPipe, TranslateModule, BtnDisabledDirective],
})
export class RegisterEmailFormComponent extends BaseComponent {
}
diff --git a/src/themes/custom/app/register-page/create-profile/create-profile.component.ts b/src/themes/custom/app/register-page/create-profile/create-profile.component.ts
index ac2491cc4ee..7c1ff908c37 100644
--- a/src/themes/custom/app/register-page/create-profile/create-profile.component.ts
+++ b/src/themes/custom/app/register-page/create-profile/create-profile.component.ts
@@ -9,6 +9,7 @@ import { TranslateModule } from '@ngx-translate/core';
import { ProfilePageSecurityFormComponent } from '../../../../../app/profile-page/profile-page-security-form/profile-page-security-form.component';
import { CreateProfileComponent as BaseComponent } from '../../../../../app/register-page/create-profile/create-profile.component';
+import { BtnDisabledDirective } from '../../../../../app/shared/btn-disabled.directive';
/**
* Component that renders the create profile page to be used by a user registering through a token
@@ -27,6 +28,7 @@ import { CreateProfileComponent as BaseComponent } from '../../../../../app/regi
AsyncPipe,
ReactiveFormsModule,
NgForOf,
+ BtnDisabledDirective,
],
})
export class CreateProfileComponent extends BaseComponent {
diff --git a/src/themes/custom/app/request-copy/email-request-copy/email-request-copy.component.ts b/src/themes/custom/app/request-copy/email-request-copy/email-request-copy.component.ts
index 1876b134a26..cf4981d289b 100644
--- a/src/themes/custom/app/request-copy/email-request-copy/email-request-copy.component.ts
+++ b/src/themes/custom/app/request-copy/email-request-copy/email-request-copy.component.ts
@@ -7,6 +7,8 @@ import { FormsModule } from '@angular/forms';
import { TranslateModule } from '@ngx-translate/core';
import { EmailRequestCopyComponent as BaseComponent } from 'src/app/request-copy/email-request-copy/email-request-copy.component';
+import { BtnDisabledDirective } from '../../../../../app/shared/btn-disabled.directive';
+
@Component({
selector: 'ds-themed-email-request-copy',
// styleUrls: ['./email-request-copy.component.scss'],
@@ -14,7 +16,7 @@ import { EmailRequestCopyComponent as BaseComponent } from 'src/app/request-copy
// templateUrl: './email-request-copy.component.html',
templateUrl: './../../../../../app/request-copy/email-request-copy/email-request-copy.component.html',
standalone: true,
- imports: [FormsModule, NgClass, NgIf, TranslateModule],
+ imports: [FormsModule, NgClass, NgIf, TranslateModule, BtnDisabledDirective],
})
export class EmailRequestCopyComponent
extends BaseComponent {
diff --git a/src/themes/custom/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/external-source-entry-import-modal/external-source-entry-import-modal.component.ts b/src/themes/custom/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/external-source-entry-import-modal/external-source-entry-import-modal.component.ts
index 424adb79429..aec7bfd6db2 100644
--- a/src/themes/custom/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/external-source-entry-import-modal/external-source-entry-import-modal.component.ts
+++ b/src/themes/custom/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/external-source-entry-import-modal/external-source-entry-import-modal.component.ts
@@ -5,6 +5,7 @@ import {
import { Component } from '@angular/core';
import { TranslateModule } from '@ngx-translate/core';
+import { BtnDisabledDirective } from '../../../../../../../../../../app/shared/btn-disabled.directive';
import { ExternalSourceEntryImportModalComponent as BaseComponent } from '../../../../../../../../../../app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/external-source-entry-import-modal/external-source-entry-import-modal.component';
import { ThemedSearchResultsComponent } from '../../../../../../../../../../app/shared/search/search-results/themed-search-results.component';
@@ -19,6 +20,7 @@ import { ThemedSearchResultsComponent } from '../../../../../../../../../../app/
ThemedSearchResultsComponent,
NgIf,
AsyncPipe,
+ BtnDisabledDirective,
],
})
export class ExternalSourceEntryImportModalComponent extends BaseComponent {
diff --git a/src/themes/custom/app/submission/sections/upload/file/section-upload-file.component.ts b/src/themes/custom/app/submission/sections/upload/file/section-upload-file.component.ts
index 13f5f976503..cea515102ac 100644
--- a/src/themes/custom/app/submission/sections/upload/file/section-upload-file.component.ts
+++ b/src/themes/custom/app/submission/sections/upload/file/section-upload-file.component.ts
@@ -6,6 +6,7 @@ import { Component } from '@angular/core';
import { TranslateModule } from '@ngx-translate/core';
import { SubmissionSectionUploadFileComponent as BaseComponent } from 'src/app/submission/sections/upload/file/section-upload-file.component';
+import { BtnDisabledDirective } from '../../../../../../../app/shared/btn-disabled.directive';
import { ThemedFileDownloadLinkComponent } from '../../../../../../../app/shared/file-download-link/themed-file-download-link.component';
import { FileSizePipe } from '../../../../../../../app/shared/utils/file-size-pipe';
import { SubmissionSectionUploadFileViewComponent } from '../../../../../../../app/submission/sections/upload/file/view/section-upload-file-view.component';
@@ -27,6 +28,7 @@ import { SubmissionSectionUploadFileViewComponent } from '../../../../../../../a
AsyncPipe,
ThemedFileDownloadLinkComponent,
FileSizePipe,
+ BtnDisabledDirective,
],
})
export class SubmissionSectionUploadFileComponent