mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Fixed accessibility issues related to dso selectors
- Fixed header ordering - Fixed input field not having a description what it does (because the header isn't always shown I decided to use aria-labels instead of regular labels)
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
<input type="search"
|
<input type="search"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
(click)="$event.stopPropagation();"
|
(click)="$event.stopPropagation();"
|
||||||
|
[attr.aria-label]="'dso-selector.placeholder' | translate: { type: typesString }"
|
||||||
placeholder="{{'dso-selector.placeholder' | translate: { type: typesString } }}"
|
placeholder="{{'dso-selector.placeholder' | translate: { type: typesString } }}"
|
||||||
[formControl]="input" ngbAutofocus (keyup.enter)="selectSingleResult()">
|
[formControl]="input" ngbAutofocus (keyup.enter)="selectSingleResult()">
|
||||||
</div>
|
</div>
|
||||||
|
@@ -75,6 +75,11 @@ export class DSOSelectorComponent implements OnInit, OnDestroy {
|
|||||||
*/
|
*/
|
||||||
@Input() sort: SortOptions;
|
@Input() sort: SortOptions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The id that should be given to the input box, this is required for accessibility reasons
|
||||||
|
*/
|
||||||
|
@Input() searchBoxId: string | null = null;
|
||||||
|
|
||||||
// list of allowed selectable dsoTypes
|
// list of allowed selectable dsoTypes
|
||||||
typesString: string;
|
typesString: string;
|
||||||
|
|
||||||
|
@@ -6,14 +6,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<button class="btn btn-outline-primary btn-lg btn-block" (click)="selectObject(undefined)">{{'dso-selector.create.community.top-level' | translate}}</button>
|
<button class="btn btn-outline-primary btn-lg btn-block" (click)="selectObject(undefined)">{{'dso-selector.create.community.top-level' | translate}}</button>
|
||||||
<h3 class="position-relative py-1 my-3 font-weight-normal">
|
<div class="h3 position-relative py-1 my-3 font-weight-normal">
|
||||||
<hr>
|
<hr>
|
||||||
<div id="create-community-or-separator" class="text-center position-absolute w-100">
|
<div id="create-community-or-separator" class="text-center position-absolute w-100">
|
||||||
<span class="px-4 bg-white">{{'dso-selector.create.community.or-divider' | translate}}</span>
|
<span class="px-4 bg-white">{{'dso-selector.create.community.or-divider' | translate}}</span>
|
||||||
</div>
|
</div>
|
||||||
</h3>
|
</div>
|
||||||
|
|
||||||
<h5 class="px-2">{{'dso-selector.create.community.sub-level' | translate}}</h5>
|
<span class="h5 px-2">{{'dso-selector.create.community.sub-level' | translate}}</span>
|
||||||
<ds-dso-selector [currentDSOId]="dsoRD?.payload.uuid" [types]="selectorTypes" [sort]="defaultSort" (onSelect)="selectObject($event)"></ds-dso-selector>
|
<ds-dso-selector [currentDSOId]="dsoRD?.payload.uuid" [types]="selectorTypes" [sort]="defaultSort" (onSelect)="selectObject($event)"></ds-dso-selector>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<h5 *ngIf="header" class="px-2">{{header | translate}}</h5>
|
<span *ngIf="header" class="h5 px-2">{{header | translate}}</span>
|
||||||
<ds-authorized-collection-selector [currentDSOId]="dsoRD?.payload.uuid"
|
<ds-authorized-collection-selector [currentDSOId]="dsoRD?.payload.uuid"
|
||||||
[entityType]="entityType"
|
[entityType]="entityType"
|
||||||
[types]="selectorTypes"
|
[types]="selectorTypes"
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<h5 *ngIf="header" class="px-2">{{header | translate}}</h5>
|
<span *ngIf="header" class="h5 px-2">{{header | translate}}</span>
|
||||||
<ds-dso-selector [currentDSOId]="dsoRD?.payload.uuid" [types]="selectorTypes" [sort]="defaultSort" (onSelect)="selectObject($event)"></ds-dso-selector>
|
<ds-dso-selector [currentDSOId]="dsoRD?.payload.uuid" [types]="selectorTypes" [sort]="defaultSort" (onSelect)="selectObject($event)"></ds-dso-selector>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<h5 *ngIf="header" class="px-2">{{header | translate}}</h5>
|
<span *ngIf="header" class="h5 px-2">{{header | translate}}</span>
|
||||||
<ds-dso-selector [currentDSOId]="dsoRD?.payload.uuid" [types]="selectorTypes" (onSelect)="selectObject($event)"></ds-dso-selector>
|
<ds-dso-selector [currentDSOId]="dsoRD?.payload.uuid" [types]="selectorTypes" (onSelect)="selectObject($event)"></ds-dso-selector>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user