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.mon": "calendar",
"addon.calendar.monday": "calendar", "addon.calendar.monday": "calendar",
"addon.calendar.monthlyview": "calendar", "addon.calendar.monthlyview": "calendar",
"addon.calendar.monthnext": "calendar",
"addon.calendar.monthprev": "calendar",
"addon.calendar.newevent": "calendar", "addon.calendar.newevent": "calendar",
"addon.calendar.noevents": "local_moodlemobileapp", "addon.calendar.noevents": "local_moodlemobileapp",
"addon.calendar.nopermissiontoupdatecalendar": "error", "addon.calendar.nopermissiontoupdatecalendar": "error",

View File

@ -12,7 +12,7 @@
<ion-grid class="ion-no-padding addon-calendar-navigation"> <ion-grid class="ion-no-padding addon-calendar-navigation">
<ion-row class="ion-align-items-center"> <ion-row class="ion-align-items-center">
<ion-col class="ion-text-start" *ngIf="canNavigate"> <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-icon name="fas-chevron-left" slot="icon-only" aria-hidden="true" />
</ion-button> </ion-button>
</ion-col> </ion-col>
@ -23,7 +23,7 @@
</h2> </h2>
</ion-col> </ion-col>
<ion-col class="ion-text-end" *ngIf="canNavigate"> <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-icon name="fas-chevron-right" slot="icon-only" aria-hidden="true" />
</ion-button> </ion-button>
</ion-col> </ion-col>

View File

@ -39,6 +39,8 @@
"mon": "Mon", "mon": "Mon",
"monday": "Monday", "monday": "Monday",
"monthlyview": "Monthly view", "monthlyview": "Monthly view",
"monthnext": "Next month",
"monthprev": "Previous month",
"newevent": "New event", "newevent": "New event",
"noevents": "There are no events", "noevents": "There are no events",
"nopermissiontoupdatecalendar": "Sorry, but you do not have permission to update the calendar event.", "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-badge color="light">{{ totalSize | coreBytesToSize }}</ion-badge>
</ion-label> </ion-label>
<ion-button slot="end" (click)="deleteCompletelyDownloadedCourses($event)" <ion-button slot="end" (click)="deleteCompletelyDownloadedCourses($event)"
[disabled]="completelyDownloadedCourses.length === 0" color="danger" fill="clear"> [disabled]="completelyDownloadedCourses.length === 0" color="danger" fill="clear"
<ion-icon name="fas-trash" slot="icon-only" ariaLabel="{{ 'addon.storagemanager.deletecourses' | translate }}" /> [attr.aria-label]="'addon.storagemanager.deletecourses' | translate">
<ion-icon name="fas-trash" slot="icon-only" aria-hidden="true" />
</ion-button> </ion-button>
</ion-item> </ion-item>
<ion-item *ngFor="let course of downloadedCourses" class="course" (click)="openCourse(course.id, course.title)" button <ion-item *ngFor="let course of downloadedCourses" class="course" (click)="openCourse(course.id, course.title)" button
@ -54,9 +55,10 @@
{{ course.totalSize | coreBytesToSize }} {{ course.totalSize | coreBytesToSize }}
</ion-badge> </ion-badge>
</ion-label> </ion-label>
<ion-button slot="end" (click)="deleteCourse($event, course)" [disabled]="course.isDownloading" color="danger" fill="clear"> <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: [attr.aria-label]="'addon.storagemanager.deletedatafrom' | translate:
{ name: course.title }" /> { name: course.title }">
<ion-icon name="fas-trash" slot="icon-only" aria-hidden="true" />
</ion-button> </ion-button>
</ion-item> </ion-item>
</ion-card> </ion-card>