Skip to content

Commit 3658ad1

Browse files
Ensuring that the message “There were no items to show” is announced to the screen reader when necessary
1 parent e54b1ce commit 3658ad1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/app/shared/form/vocabulary-treeview/vocabulary-treeview.component.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@
2828
</div>
2929
<div class="treeview-container">
3030
<ds-loading *ngIf="loading | async" [showMessage]="false"></ds-loading>
31-
<h2 *ngIf="(loading | async) !== true && dataSource.data.length === 0" class="h4 text-center text-muted mt-4" >
32-
<span>{{'vocabulary-treeview.search.no-result' | translate}}</span>
33-
</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>
3436
<cdk-tree [dataSource]="dataSource" [treeControl]="treeControl">
3537
<!-- Leaf node -->
3638
<cdk-tree-node *cdkTreeNodeDef="let node" cdkTreeNodePadding class="d-flex">

0 commit comments

Comments
 (0)