Merge pull request #2261 from crazyserver/MOBILE-3301

MOBILE-3301 ux: Add aria-label to context more buttons
main
Juan Leyva 2020-01-29 15:54:58 +01:00 committed by GitHub
commit c4becfd0af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 9 additions and 5 deletions

View File

@ -1476,6 +1476,7 @@
"core.digitalminor_desc": "moodle",
"core.discard": "local_moodlemobileapp",
"core.dismiss": "local_moodlemobileapp",
"core.displayoptions": "atto_media",
"core.done": "survey",
"core.download": "moodle",
"core.downloaded": "local_moodlemobileapp",

View File

@ -67,7 +67,7 @@
<core-icon name="fa-star" class="addon-forum-star" *ngIf="!discussion.pinned && discussion.starred"></core-icon>
<core-format-text [text]="discussion.subject" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text>
</h2>
<button ion-button icon-only clear color="dark" (click)="showOptionsMenu($event, discussion)" *ngIf="canPin || discussion.canlock || discussion.canfavourite">
<button ion-button icon-only clear color="dark" (click)="showOptionsMenu($event, discussion)" *ngIf="canPin || discussion.canlock || discussion.canfavourite" [attr.aria-label]="('core.displayoptions' | translate)">
<core-icon name="more"></core-icon>
</button>
</div>

View File

@ -10,7 +10,7 @@
<ion-note float-end padding-left text-end *ngIf="trackPosts && !post.postread" [attr.aria-label]="'addon.mod_forum.unread' | translate">
<core-icon name="fa-circle" color="primary"></core-icon>
</ion-note>
<button ion-button icon-only clear color="dark" (click)="showOptionsMenu($event)" *ngIf="optionsMenuEnabled">
<button ion-button icon-only clear color="dark" (click)="showOptionsMenu($event)" *ngIf="optionsMenuEnabled" [attr.aria-label]="('core.displayoptions' | translate)">
<core-icon name="more"></core-icon>
</button>
</div>
@ -26,7 +26,7 @@
<ion-note float-end padding-left text-end *ngIf="trackPosts && !post.postread" [attr.aria-label]="'addon.mod_forum.unread' | translate">
<core-icon name="fa-circle" color="primary"></core-icon>
</ion-note>
<button ion-button icon-only clear color="dark" (click)="showOptionsMenu($event)" *ngIf="optionsMenuEnabled">
<button ion-button icon-only clear color="dark" (click)="showOptionsMenu($event)" *ngIf="optionsMenuEnabled" [attr.aria-label]="('core.displayoptions' | translate)">
<core-icon name="more"></core-icon>
</button>
</ng-container>

View File

@ -683,6 +683,7 @@ ion-app.app-root {
.alert-message {
overflow-y: auto;
user-select: text;
}
ion-alert.core-nohead {

View File

@ -1476,6 +1476,7 @@
"core.digitalminor_desc": "Please ask your parent/guardian to contact:",
"core.discard": "Discard",
"core.dismiss": "Dismiss",
"core.displayoptions": "Display options",
"core.done": "Done",
"core.download": "Download",
"core.downloaded": "Downloaded",

View File

@ -70,7 +70,7 @@ export class CoreContextMenuComponent implements OnInit, OnDestroy {
*/
ngOnInit(): void {
this.icon = this.icon || 'more';
this.ariaLabel = this.ariaLabel || this.title || this.translate.instant('core.info');
this.ariaLabel = this.ariaLabel || this.title || this.translate.instant('core.displayoptions');
}
/**

View File

@ -33,7 +33,7 @@
<ion-icon *ngIf="downloadCourseEnabled && prefetchCourseData.downloadSucceeded && !showSpinner" class="core-icon-downloaded" name="cloud-done" color="success" [attr.aria-label]="'core.downloaded' | translate" role="status"></ion-icon>
<!-- Options menu. -->
<button ion-button icon-only clear color="dark" (click)="showCourseOptionsMenu($event)" *ngIf="!showSpinner">
<button ion-button icon-only clear color="dark" (click)="showCourseOptionsMenu($event)" *ngIf="!showSpinner" [attr.aria-label]="('core.displayoptions' | translate)">
<core-icon name="more"></core-icon>
</button>
</div>

View File

@ -74,6 +74,7 @@
"digitalminor_desc": "Please ask your parent/guardian to contact:",
"discard": "Discard",
"dismiss": "Dismiss",
"displayoptions": "Display options",
"done": "Done",
"download": "Download",
"downloaded": "Downloaded",