MOBILE-3320 a11y: Fix ion-fab aria-label not read by VoiceOver

main
Dani Palou 2021-06-23 12:34:01 +02:00
parent 6d9b171e08
commit c9ead4d4fb
11 changed files with 11 additions and 0 deletions

View File

@ -94,6 +94,7 @@
<ion-fab slot="fixed" core-fab vertical="bottom" horizontal="end" *ngIf="canCreate && loaded"> <ion-fab slot="fixed" core-fab vertical="bottom" horizontal="end" *ngIf="canCreate && loaded">
<ion-fab-button (click)="openEdit()" [attr.aria-label]="'addon.calendar.newevent' | translate"> <ion-fab-button (click)="openEdit()" [attr.aria-label]="'addon.calendar.newevent' | translate">
<ion-icon name="fas-plus" aria-hidden="true"></ion-icon> <ion-icon name="fas-plus" aria-hidden="true"></ion-icon>
<span class="sr-only">{{ 'addon.calendar.newevent' | translate }}</span>
</ion-fab-button> </ion-fab-button>
</ion-fab> </ion-fab>
</ion-content> </ion-content>

View File

@ -50,6 +50,7 @@
<ion-fab slot="fixed" core-fab vertical="bottom" horizontal="end" *ngIf="canCreate"> <ion-fab slot="fixed" core-fab vertical="bottom" horizontal="end" *ngIf="canCreate">
<ion-fab-button (click)="openEdit()" [attr.aria-label]="'addon.calendar.newevent' | translate"> <ion-fab-button (click)="openEdit()" [attr.aria-label]="'addon.calendar.newevent' | translate">
<ion-icon name="fas-plus" aria-hidden="true"></ion-icon> <ion-icon name="fas-plus" aria-hidden="true"></ion-icon>
<span class="sr-only">{{ 'addon.calendar.newevent' | translate }}</span>
</ion-fab-button> </ion-fab-button>
</ion-fab> </ion-fab>
</ion-content> </ion-content>

View File

@ -90,6 +90,7 @@
<ion-fab slot="fixed" core-fab vertical="bottom" horizontal="end" *ngIf="canCreate"> <ion-fab slot="fixed" core-fab vertical="bottom" horizontal="end" *ngIf="canCreate">
<ion-fab-button (click)="openEdit()" [attr.aria-label]="'addon.calendar.newevent' | translate"> <ion-fab-button (click)="openEdit()" [attr.aria-label]="'addon.calendar.newevent' | translate">
<ion-icon name="fas-plus" aria-hidden="true"></ion-icon> <ion-icon name="fas-plus" aria-hidden="true"></ion-icon>
<span class="sr-only">{{ 'addon.calendar.newevent' | translate }}</span>
</ion-fab-button> </ion-fab-button>
</ion-fab> </ion-fab>
</ion-content> </ion-content>

View File

@ -133,6 +133,7 @@
<ion-fab-button size="small" (click)="scrollToFirstUnreadMessage()" color="light" <ion-fab-button size="small" (click)="scrollToFirstUnreadMessage()" color="light"
[attr.aria-label]="'addon.messages.newmessages' | translate"> [attr.aria-label]="'addon.messages.newmessages' | translate">
<ion-icon name="fas-arrow-down" aria-hidden="true"></ion-icon> <ion-icon name="fas-arrow-down" aria-hidden="true"></ion-icon>
<span class="sr-only">{{ 'addon.messages.newmessages' | translate }}</span>
<span class="core-discussion-messages-badge">{{ newMessages }}</span> <span class="core-discussion-messages-badge">{{ newMessages }}</span>
</ion-fab-button> </ion-fab-button>
</ion-fab> </ion-fab>

View File

@ -154,5 +154,6 @@
<ion-fab slot="fixed" core-fab vertical="bottom" horizontal="end" *ngIf="canAdd"> <ion-fab slot="fixed" core-fab vertical="bottom" horizontal="end" *ngIf="canAdd">
<ion-fab-button (click)="gotoAddEntries()" [attr.aria-label]="'addon.mod_data.addentries' | translate"> <ion-fab-button (click)="gotoAddEntries()" [attr.aria-label]="'addon.mod_data.addentries' | translate">
<ion-icon name="fas-plus" aria-hidden="true"></ion-icon> <ion-icon name="fas-plus" aria-hidden="true"></ion-icon>
<span class="sr-only">{{ 'addon.mod_data.addentries' | translate }}</span>
</ion-fab-button> </ion-fab-button>
</ion-fab> </ion-fab>

View File

@ -167,6 +167,7 @@
<ion-fab slot="fixed" core-fab vertical="bottom" horizontal="end" *ngIf="forum && canAddDiscussion"> <ion-fab slot="fixed" core-fab vertical="bottom" horizontal="end" *ngIf="forum && canAddDiscussion">
<ion-fab-button (click)="openNewDiscussion()" [attr.aria-label]="addDiscussionText"> <ion-fab-button (click)="openNewDiscussion()" [attr.aria-label]="addDiscussionText">
<ion-icon name="fas-plus" aria-hidden="true"></ion-icon> <ion-icon name="fas-plus" aria-hidden="true"></ion-icon>
<span class="sr-only">{{ addDiscussionText }}</span>
</ion-fab-button> </ion-fab-button>
</ion-fab> </ion-fab>
</core-split-view> </core-split-view>

View File

@ -109,6 +109,7 @@
<ion-fab slot="fixed" core-fab vertical="bottom" horizontal="end" *ngIf="canAdd"> <ion-fab slot="fixed" core-fab vertical="bottom" horizontal="end" *ngIf="canAdd">
<ion-fab-button (click)="openNewEntry()" [attr.aria-label]="'addon.mod_glossary.addentry' | translate"> <ion-fab-button (click)="openNewEntry()" [attr.aria-label]="'addon.mod_glossary.addentry' | translate">
<ion-icon name="fas-plus" aria-hidden="true"></ion-icon> <ion-icon name="fas-plus" aria-hidden="true"></ion-icon>
<span class="sr-only">{{ 'addon.mod_glossary.addentry' | translate }}</span>
</ion-fab-button> </ion-fab-button>
</ion-fab> </ion-fab>
</core-split-view> </core-split-view>

View File

@ -97,5 +97,6 @@
<ion-fab slot="fixed" core-fab vertical="bottom" horizontal="end" *ngIf="canEdit"> <ion-fab slot="fixed" core-fab vertical="bottom" horizontal="end" *ngIf="canEdit">
<ion-fab-button (click)="goToNewPage()" [attr.aria-label]="'addon.mod_wiki.createpage' | translate"> <ion-fab-button (click)="goToNewPage()" [attr.aria-label]="'addon.mod_wiki.createpage' | translate">
<ion-icon name="fas-plus" aria-hidden="true"></ion-icon> <ion-icon name="fas-plus" aria-hidden="true"></ion-icon>
<span class="sr-only">{{ 'addon.mod_wiki.createpage' | translate }}</span>
</ion-fab-button> </ion-fab-button>
</ion-fab> </ion-fab>

View File

@ -99,6 +99,7 @@
<ion-fab slot="fixed" core-fab vertical="bottom" horizontal="end" *ngIf="userId && notesLoaded"> <ion-fab slot="fixed" core-fab vertical="bottom" horizontal="end" *ngIf="userId && notesLoaded">
<ion-fab-button (click)="addNote($event)" [attr.aria-label]="'addon.notes.addnewnote' |translate"> <ion-fab-button (click)="addNote($event)" [attr.aria-label]="'addon.notes.addnewnote' |translate">
<ion-icon name="fas-plus" aria-hidden="true"></ion-icon> <ion-icon name="fas-plus" aria-hidden="true"></ion-icon>
<span class="sr-only">{{ 'addon.notes.addnewnote' | translate }}</span>
</ion-fab-button> </ion-fab-button>
</ion-fab> </ion-fab>
</ion-content> </ion-content>

View File

@ -52,6 +52,7 @@
<ion-fab slot="fixed" core-fab vertical="bottom" horizontal="end" *ngIf="showUpload && root != 'site' && !path"> <ion-fab slot="fixed" core-fab vertical="bottom" horizontal="end" *ngIf="showUpload && root != 'site' && !path">
<ion-fab-button (click)="uploadFile()" [attr.aria-label]="'core.fileuploader.uploadafile' | translate"> <ion-fab-button (click)="uploadFile()" [attr.aria-label]="'core.fileuploader.uploadafile' | translate">
<ion-icon name="fas-plus" aria-hidden="true"></ion-icon> <ion-icon name="fas-plus" aria-hidden="true"></ion-icon>
<span class="sr-only">{{ 'core.fileuploader.uploadafile' | translate }}</span>
</ion-fab-button> </ion-fab-button>
</ion-fab> </ion-fab>
</ion-content> </ion-content>

View File

@ -42,6 +42,7 @@
<ion-fab slot="fixed" core-fab vertical="bottom" horizontal="end"> <ion-fab slot="fixed" core-fab vertical="bottom" horizontal="end">
<ion-fab-button (click)="add()" [attr.aria-label]="'core.add' | translate"> <ion-fab-button (click)="add()" [attr.aria-label]="'core.add' | translate">
<ion-icon name="fas-plus" aria-hidden="true"></ion-icon> <ion-icon name="fas-plus" aria-hidden="true"></ion-icon>
<span class="sr-only">{{ 'core.add' | translate }}</span>
</ion-fab-button> </ion-fab-button>
</ion-fab> </ion-fab>
</ion-content> </ion-content>