Fix reading toast content in screen readers

This commit is contained in:
Chocobozzz 2024-09-30 16:07:49 +02:00
parent 639feb2306
commit 3883444567
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
3 changed files with 7 additions and 16 deletions

View File

@ -1,10 +1,11 @@
<h1>
<span class="text-nowrap me-2">
<div class="d-flex">
<h1 class="text-nowrap">
<my-global-icon iconName="follower" aria-hidden="true"></my-global-icon>
<ng-container i18n>My followers</ng-container>
<span *ngIf="pagination.totalItems" [title]="getTotalTitle()" class="pt-badge badge-secondary"> {{ pagination.totalItems }}</span>
</span>
</h1>
</h1>
<span *ngIf="pagination.totalItems" [title]="getTotalTitle()" class="pt-badge badge-secondary"> {{ pagination.totalItems }}</span>
</div>
<div class="followers-header">
<my-advanced-input-filter [filters]="inputFilters" (search)="onSearch($event)"></my-advanced-input-filter>

View File

@ -60,7 +60,7 @@
<p-toast position="bottom-right">
<ng-template let-message pTemplate="message">
<div class="notification-block">
<div class="message" [attr.role]="getNotificationRole(message)">
<div class="message">
<h3>{{ message.summary }}</h3>
<p>{{ message.detail }}</p>
</div>

View File

@ -202,16 +202,6 @@ export class AppComponent implements OnInit, AfterViewInit {
}
}
getNotificationRole (message: { severity: 'success' | 'error' | 'info' }) {
switch (message.severity) {
case 'error':
return 'alert'
default:
return 'status'
}
}
// ---------------------------------------------------------------------------
private initRouteEvents () {