Skip to content

Commit 75260b0

Browse files
Andrea-Guevaratdonohue
authored andcommitted
Ensuring that the message “There were no items to show” is announced to the screen reader when necessary
1 parent 14680b0 commit 75260b0

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
@@ -24,9 +24,11 @@
2424
</div>
2525
<div class="treeview-container">
2626
<ds-themed-loading *ngIf="loading | async" [showMessage]="false"></ds-themed-loading>
27-
<h2 *ngIf="!(loading | async) && dataSource.data.length === 0" class="h4 text-center text-muted mt-4" >
28-
<span>{{'vocabulary-treeview.search.no-result' | translate}}</span>
29-
</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>
3032
<cdk-tree [dataSource]="dataSource" [treeControl]="treeControl">
3133
<!-- Leaf node -->
3234
<cdk-tree-node *cdkTreeNodeDef="let node" cdkTreeNodePadding class="d-flex">

0 commit comments

Comments
 (0)