MOBILE-3320 tabs: Fix badges position

main
Pau Ferrer Ocaña 2021-06-21 12:35:43 +02:00
parent 06cbac75b1
commit ed6044ad28
2 changed files with 18 additions and 14 deletions

View File

@ -28,13 +28,15 @@
[tabindex]="selected == tab.id ? 0 : -1" [tabindex]="selected == tab.id ? 0 : -1"
> >
<ion-icon *ngIf="tab.icon" [name]="tab.icon" aria-hidden="true"></ion-icon> <ion-icon *ngIf="tab.icon" [name]="tab.icon" aria-hidden="true"></ion-icon>
<ion-label>{{ tab.title | translate}}</ion-label> <ion-label>
<ion-badge *ngIf="tab.badge"> {{ tab.title | translate}}
<span [attr.aria-hidden]="!!tab.badgeA11yText">{{ tab.badge }}</span> <ion-badge *ngIf="tab.badge">
<span *ngIf="tab.badgeA11yText" class="sr-only"> <span [attr.aria-hidden]="!!tab.badgeA11yText">{{ tab.badge }}</span>
{{ tab.badgeA11yText | translate: {$a : tab.badge } }} <span *ngIf="tab.badgeA11yText" class="sr-only">
</span> {{ tab.badgeA11yText | translate: {$a : tab.badge } }}
</ion-badge> </span>
</ion-badge>
</ion-label>
</ion-tab-button> </ion-tab-button>
</ion-slide> </ion-slide>
</ng-container> </ng-container>

View File

@ -27,13 +27,15 @@
[tabindex]="selected == tab.id ? 0 : -1" [tabindex]="selected == tab.id ? 0 : -1"
> >
<ion-icon *ngIf="tab.icon" [name]="tab.icon" aria-hidden="true"></ion-icon> <ion-icon *ngIf="tab.icon" [name]="tab.icon" aria-hidden="true"></ion-icon>
<ion-label>{{ tab.title | translate}}</ion-label> <ion-label>
<ion-badge *ngIf="tab.badge"> {{ tab.title | translate}}
<span [attr.aria-hidden]="!!tab.badgeA11yText">{{ tab.badge }}</span> <ion-badge *ngIf="tab.badge">
<span *ngIf="tab.badgeA11yText" class="sr-only"> <span [attr.aria-hidden]="!!tab.badgeA11yText">{{ tab.badge }}</span>
{{ tab.badgeA11yText | translate: {$a : tab.badge } }} <span *ngIf="tab.badgeA11yText" class="sr-only">
</span> {{ tab.badgeA11yText | translate: {$a : tab.badge } }}
</ion-badge> </span>
</ion-badge>
</ion-label>
</ion-tab-button> </ion-tab-button>
</ion-slide> </ion-slide>
</ng-container> </ng-container>