|
2 | 2 | <div class="treeview-header row mb-1"> |
3 | 3 | <div class="col-12"> |
4 | 4 | <div class="input-group"> |
5 | | - <input type="text" class="form-control" [(ngModel)]="searchText" (keyup.enter)="search()" |
| 5 | + <input #searchInput type="text" class="form-control" [(ngModel)]="searchText" (keyup.enter)="search()" |
6 | 6 | [attr.aria-label]="'vocabulary-treeview.search.form.search-placeholder' | translate" |
7 | 7 | [placeholder]="'vocabulary-treeview.search.form.search-placeholder' | translate"> |
8 | 8 | <div class="input-group-append" id="button-addon4"> |
9 | | - <button class="btn btn-outline-primary" type="button" (click)="search()" [disabled]="!isSearchEnabled()"> |
| 9 | + <button class="btn btn-outline-primary" type="button" (click)="search()" [disabled]="!isSearchEnabled()" |
| 10 | + [attr.aria-label]="'vocabulary-treeview.search.form.search' | translate"> |
10 | 11 | {{'vocabulary-treeview.search.form.search' | translate}} |
11 | 12 | </button> |
12 | | - <button class="btn btn-outline-secondary" type="button" (click)="reset()"> |
| 13 | + <button class="btn btn-outline-secondary" type="button" (click)="reset()" |
| 14 | + [attr.aria-label]="'vocabulary-treeview.search.form.reset' | translate"> |
13 | 15 | {{'vocabulary-treeview.search.form.reset' | translate}} |
14 | 16 | </button> |
15 | | - <button *ngIf="showAdd && this.vocabularyOptions.closed" class="btn btn-outline-primary" type="button" (click)="add()"> |
| 17 | + <button *ngIf="showAdd && this.vocabularyOptions.closed" class="btn btn-outline-primary" type="button" (click)="add()" |
| 18 | + [attr.aria-label]="'vocabulary-treeview.search.form.add' | translate"> |
16 | 19 | {{'vocabulary-treeview.search.form.add' | translate}} |
17 | 20 | </button> |
18 | | - <button class="btn btn-outline-primary" type="button" (click)="add()" [disabled]="this.vocabularyOptions.closed"> |
| 21 | + <button class="btn btn-outline-primary" type="button" (click)="add()" [disabled]="this.vocabularyOptions.closed" |
| 22 | + [attr.aria-label]="'vocabulary-treeview.search.form.add' | translate"> |
19 | 23 | {{'vocabulary-treeview.search.form.add' | translate}} |
20 | 24 | </button> |
21 | 25 | </div> |
|
24 | 28 | </div> |
25 | 29 | <div class="treeview-container"> |
26 | 30 | <ds-loading *ngIf="loading | async" [showMessage]="false"></ds-loading> |
27 | | - <h2 *ngIf="(loading | async) !== true && dataSource.data.length === 0" class="h4 text-center text-muted mt-4" > |
28 | | - <span>{{'vocabulary-treeview.search.no-result' | translate}}</span> |
29 | | - </h2> |
| 31 | + <div aria-live="polite"> |
| 32 | + <h2 *ngIf="(loading | async) !== true && dataSource.data.length === 0" class="h4 text-center text-muted mt-4" > |
| 33 | + <span>{{'vocabulary-treeview.search.no-result' | translate}}</span> |
| 34 | + </h2> |
| 35 | + </div> |
30 | 36 | <cdk-tree [dataSource]="dataSource" [treeControl]="treeControl"> |
31 | 37 | <!-- Leaf node --> |
32 | 38 | <cdk-tree-node *cdkTreeNodeDef="let node" cdkTreeNodePadding class="d-flex"> |
@@ -91,13 +97,15 @@ <h2 *ngIf="(loading | async) !== true && dataSource.data.length === 0" class="h4 |
91 | 97 | </cdk-tree-node> |
92 | 98 |
|
93 | 99 | <cdk-tree-node *cdkTreeNodeDef="let node; when: isLoadMore" cdkTreeNodePadding> |
94 | | - <button class="btn btn-outline-secondary btn-sm" (click)="loadMore(node.loadMoreParentItem)"> |
| 100 | + <button class="btn btn-outline-secondary btn-sm" (click)="loadMore(node.loadMoreParentItem)" |
| 101 | + [attr.aria-label]="'vocabulary-treeview.load-more' | translate"> |
95 | 102 | {{'vocabulary-treeview.load-more' | translate}}... |
96 | 103 | </button> |
97 | 104 | </cdk-tree-node> |
98 | 105 |
|
99 | 106 | <cdk-tree-node *cdkTreeNodeDef="let node; when: isLoadMoreRoot"> |
100 | | - <button class="btn btn-outline-secondary btn-sm" (click)="loadMoreRoot(node)"> |
| 107 | + <button class="btn btn-outline-secondary btn-sm" (click)="loadMoreRoot(node)" |
| 108 | + [attr.aria-label]="'vocabulary-treeview.load-more' | translate"> |
101 | 109 | {{'vocabulary-treeview.load-more' | translate}}... |
102 | 110 | </button> |
103 | 111 | </cdk-tree-node> |
|
0 commit comments