MOBILE-4565 a11y: Label improvements

main
Pau Ferrer Ocaña 2024-04-08 12:45:10 +02:00
parent 03879074ec
commit 8c3697a579
4 changed files with 13 additions and 7 deletions

View File

@ -143,6 +143,8 @@
"addon.calendar.mon": "calendar",
"addon.calendar.monday": "calendar",
"addon.calendar.monthlyview": "calendar",
"addon.calendar.monthnext": "calendar",
"addon.calendar.monthprev": "calendar",
"addon.calendar.newevent": "calendar",
"addon.calendar.noevents": "local_moodlemobileapp",
"addon.calendar.nopermissiontoupdatecalendar": "error",

View File

@ -12,7 +12,7 @@
<ion-grid class="ion-no-padding addon-calendar-navigation">
<ion-row class="ion-align-items-center">
<ion-col class="ion-text-start" *ngIf="canNavigate">
<ion-button fill="clear" (click)="loadPrevious()" [attr.aria-label]="'core.previous' | translate">
<ion-button fill="clear" (click)="loadPrevious()" [attr.aria-label]="'addon.calendar.monthprev' | translate">
<ion-icon name="fas-chevron-left" slot="icon-only" aria-hidden="true" />
</ion-button>
</ion-col>
@ -23,7 +23,7 @@
</h2>
</ion-col>
<ion-col class="ion-text-end" *ngIf="canNavigate">
<ion-button fill="clear" (click)="loadNext()" [attr.aria-label]="'core.next' | translate">
<ion-button fill="clear" (click)="loadNext()" [attr.aria-label]="'addon.calendar.monthnext' | translate">
<ion-icon name="fas-chevron-right" slot="icon-only" aria-hidden="true" />
</ion-button>
</ion-col>

View File

@ -39,6 +39,8 @@
"mon": "Mon",
"monday": "Monday",
"monthlyview": "Monthly view",
"monthnext": "Next month",
"monthprev": "Previous month",
"newevent": "New event",
"noevents": "There are no events",
"nopermissiontoupdatecalendar": "Sorry, but you do not have permission to update the calendar event.",

View File

@ -37,8 +37,9 @@
<ion-badge color="light">{{ totalSize | coreBytesToSize }}</ion-badge>
</ion-label>
<ion-button slot="end" (click)="deleteCompletelyDownloadedCourses($event)"
[disabled]="completelyDownloadedCourses.length === 0" color="danger" fill="clear">
<ion-icon name="fas-trash" slot="icon-only" ariaLabel="{{ 'addon.storagemanager.deletecourses' | translate }}" />
[disabled]="completelyDownloadedCourses.length === 0" color="danger" fill="clear"
[attr.aria-label]="'addon.storagemanager.deletecourses' | translate">
<ion-icon name="fas-trash" slot="icon-only" aria-hidden="true" />
</ion-button>
</ion-item>
<ion-item *ngFor="let course of downloadedCourses" class="course" (click)="openCourse(course.id, course.title)" button
@ -54,9 +55,10 @@
{{ course.totalSize | coreBytesToSize }}
</ion-badge>
</ion-label>
<ion-button slot="end" (click)="deleteCourse($event, course)" [disabled]="course.isDownloading" color="danger" fill="clear">
<ion-icon name="fas-trash" slot="icon-only" [attr.aria-label]="'addon.storagemanager.deletedatafrom' | translate:
{ name: course.title }" />
<ion-button slot="end" (click)="deleteCourse($event, course)" [disabled]="course.isDownloading" color="danger" fill="clear"
[attr.aria-label]="'addon.storagemanager.deletedatafrom' | translate:
{ name: course.title }">
<ion-icon name="fas-trash" slot="icon-only" aria-hidden="true" />
</ion-button>
</ion-item>
</ion-card>