|
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 class="btn btn-outline-primary" type="button" (click)="add()" [disabled]="this.vocabularyOptions.closed"> |
| 17 | + <button class="btn btn-outline-primary" type="button" (click)="add()" [disabled]="this.vocabularyOptions.closed" |
| 18 | + [attr.aria-label]="'vocabulary-treeview.search.form.add' | translate"> |
16 | 19 | {{'vocabulary-treeview.search.form.add' | translate}} |
17 | 20 | </button> |
18 | 21 | </div> |
|
21 | 24 | </div> |
22 | 25 | <div class="treeview-container"> |
23 | 26 | <ds-themed-loading *ngIf="loading | async" [showMessage]="false"></ds-themed-loading> |
24 | | - <h2 *ngIf="!(loading | async) && dataSource.data.length === 0" class="h4 text-center text-muted mt-4" > |
25 | | - <span>{{'vocabulary-treeview.search.no-result' | translate}}</span> |
26 | | - </h2> |
| 27 | + <div aria-live="polite"> |
| 28 | + <h2 *ngIf="!(loading | async) && dataSource.data.length === 0" class="h4 text-center text-muted mt-4" > |
| 29 | + <span>{{'vocabulary-treeview.search.no-result' | translate}}</span> |
| 30 | + </h2> |
| 31 | + </div> |
27 | 32 | <cdk-tree [dataSource]="dataSource" [treeControl]="treeControl"> |
28 | 33 | <!-- Leaf node --> |
29 | 34 | <cdk-tree-node *cdkTreeNodeDef="let node" cdkTreeNodePadding class="d-flex"> |
@@ -88,13 +93,15 @@ <h2 *ngIf="!(loading | async) && dataSource.data.length === 0" class="h4 text-ce |
88 | 93 | </cdk-tree-node> |
89 | 94 |
|
90 | 95 | <cdk-tree-node *cdkTreeNodeDef="let node; when: isLoadMore" cdkTreeNodePadding> |
91 | | - <button class="btn btn-outline-secondary btn-sm" (click)="loadMore(node.loadMoreParentItem)"> |
| 96 | + <button class="btn btn-outline-secondary btn-sm" (click)="loadMore(node.loadMoreParentItem)" |
| 97 | + [attr.aria-label]="'vocabulary-treeview.load-more' | translate"> |
92 | 98 | {{'vocabulary-treeview.load-more' | translate}}... |
93 | 99 | </button> |
94 | 100 | </cdk-tree-node> |
95 | 101 |
|
96 | 102 | <cdk-tree-node *cdkTreeNodeDef="let node; when: isLoadMoreRoot"> |
97 | | - <button class="btn btn-outline-secondary btn-sm" (click)="loadMoreRoot(node)"> |
| 103 | + <button class="btn btn-outline-secondary btn-sm" (click)="loadMoreRoot(node)" |
| 104 | + [attr.aria-label]="'vocabulary-treeview.load-more' | translate"> |
98 | 105 | {{'vocabulary-treeview.load-more' | translate}}... |
99 | 106 | </button> |
100 | 107 | </cdk-tree-node> |
|
0 commit comments