forked from CIT/Vmeda.Online
		
	Merge pull request #2819 from NoelDeMartin/MOBILE-3320
MOBILE-3320: a11y tweaks + chart fix
This commit is contained in:
		
						commit
						15cd2b340f
					
				
							
								
								
									
										4
									
								
								.github/workflows/e2e.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/e2e.yml
									
									
									
									
										vendored
									
									
								
							@ -1,6 +1,8 @@
 | 
				
			|||||||
name: E2E
 | 
					name: E2E
 | 
				
			||||||
 | 
					
 | 
				
			||||||
on: [push, pull_request]
 | 
					on:
 | 
				
			||||||
 | 
					  schedule:
 | 
				
			||||||
 | 
					    - cron: '0 0 * * *'  # every day at midnight
 | 
				
			||||||
 | 
					
 | 
				
			||||||
jobs:
 | 
					jobs:
 | 
				
			||||||
  e2e:
 | 
					  e2e:
 | 
				
			||||||
 | 
				
			|||||||
@ -24,7 +24,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
<!-- Edit -->
 | 
					<!-- Edit -->
 | 
				
			||||||
<ion-item class="ion-text-wrap" *ngIf="edit && loaded">
 | 
					<ion-item class="ion-text-wrap" *ngIf="edit && loaded">
 | 
				
			||||||
    <ion-label></ion-label>
 | 
					    <ion-label class="sr-only">{{ plugin.name }}</ion-label>
 | 
				
			||||||
    <core-rich-text-editor [control]="control" [placeholder]="plugin.name"
 | 
					    <core-rich-text-editor [control]="control" [placeholder]="plugin.name"
 | 
				
			||||||
        name="assignfeedbackcomments_editor" [component]="component" [componentId]="assign.cmid" [autoSave]="true"
 | 
					        name="assignfeedbackcomments_editor" [component]="component" [componentId]="assign.cmid" [autoSave]="true"
 | 
				
			||||||
        contextLevel="module" [contextInstanceId]="assign.cmid" elementId="assignfeedbackcomments_editor"
 | 
					        contextLevel="module" [contextInstanceId]="assign.cmid" elementId="assignfeedbackcomments_editor"
 | 
				
			||||||
 | 
				
			|||||||
@ -5,7 +5,7 @@
 | 
				
			|||||||
    </ion-label>
 | 
					    </ion-label>
 | 
				
			||||||
</ion-item>
 | 
					</ion-item>
 | 
				
			||||||
<ion-item [formGroup]="form">
 | 
					<ion-item [formGroup]="form">
 | 
				
			||||||
    <ion-label></ion-label>
 | 
					    <ion-label class="sr-only">{{ 'addon.mod_quiz.quizpassword' | translate }}</ion-label>
 | 
				
			||||||
    <core-show-password [name]="'quizpassword'">
 | 
					    <core-show-password [name]="'quizpassword'">
 | 
				
			||||||
        <ion-input id="addon-mod_quiz-accessrule-password-input" name="quizpassword" type="password"
 | 
					        <ion-input id="addon-mod_quiz-accessrule-password-input" name="quizpassword" type="password"
 | 
				
			||||||
            placeholder="{{ 'addon.mod_quiz.quizpassword' | translate }}" [formControlName]="'quizpassword'" [clearOnEdit]="false">
 | 
					            placeholder="{{ 'addon.mod_quiz.quizpassword' | translate }}" [formControlName]="'quizpassword'" [clearOnEdit]="false">
 | 
				
			||||||
 | 
				
			|||||||
@ -19,14 +19,14 @@
 | 
				
			|||||||
    <core-loading [hideUntil]="loaded">
 | 
					    <core-loading [hideUntil]="loaded">
 | 
				
			||||||
        <form [formGroup]="pageForm" #editPageForm *ngIf="loaded">
 | 
					        <form [formGroup]="pageForm" #editPageForm *ngIf="loaded">
 | 
				
			||||||
            <ion-item class="ion-text-wrap" *ngIf="canEditTitle">
 | 
					            <ion-item class="ion-text-wrap" *ngIf="canEditTitle">
 | 
				
			||||||
                <ion-label></ion-label>
 | 
					                <ion-label class="sr-only">{{ 'addon.mod_wiki.newpagetitle' | translate }}</ion-label>
 | 
				
			||||||
                <ion-input name="title" type="text" [placeholder]="'addon.mod_wiki.newpagetitle' | translate"
 | 
					                <ion-input name="title" type="text" [placeholder]="'addon.mod_wiki.newpagetitle' | translate"
 | 
				
			||||||
                    formControlName="title">
 | 
					                    formControlName="title">
 | 
				
			||||||
                </ion-input>
 | 
					                </ion-input>
 | 
				
			||||||
            </ion-item>
 | 
					            </ion-item>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            <ion-item>
 | 
					            <ion-item>
 | 
				
			||||||
                <ion-label></ion-label>
 | 
					                <ion-label class="sr-only">{{ 'core.content' | translate }}</ion-label>
 | 
				
			||||||
                <core-rich-text-editor [control]="contentControl" [placeholder]="'core.content' | translate"
 | 
					                <core-rich-text-editor [control]="contentControl" [placeholder]="'core.content' | translate"
 | 
				
			||||||
                    name="wiki_page_content" [component]="component" [componentId]="cmId" [autoSave]="true" contextLevel="module"
 | 
					                    name="wiki_page_content" [component]="component" [componentId]="cmId" [autoSave]="true" contextLevel="module"
 | 
				
			||||||
                    [contextInstanceId]="cmId" elementId="newcontent_editor" [draftExtraParams]="editorExtraParams">
 | 
					                    [contextInstanceId]="cmId" elementId="newcontent_editor" [draftExtraParams]="editorExtraParams">
 | 
				
			||||||
 | 
				
			|||||||
@ -19,7 +19,7 @@
 | 
				
			|||||||
            </ion-select>
 | 
					            </ion-select>
 | 
				
			||||||
        </ion-item>
 | 
					        </ion-item>
 | 
				
			||||||
        <ion-item>
 | 
					        <ion-item>
 | 
				
			||||||
            <ion-label></ion-label>
 | 
					            <ion-label class="sr-only">{{ 'addon.notes.note' | translate }}</ion-label>
 | 
				
			||||||
            <ion-textarea placeholder="{{ 'addon.notes.note' | translate }}" rows="5" [(ngModel)]="text" name="text"
 | 
					            <ion-textarea placeholder="{{ 'addon.notes.note' | translate }}" rows="5" [(ngModel)]="text" name="text"
 | 
				
			||||||
                required="required">
 | 
					                required="required">
 | 
				
			||||||
            </ion-textarea>
 | 
					            </ion-textarea>
 | 
				
			||||||
 | 
				
			|||||||
@ -12,7 +12,7 @@
 | 
				
			|||||||
    <ng-container *ngIf="!review">
 | 
					    <ng-container *ngIf="!review">
 | 
				
			||||||
        <!-- Textarea. -->
 | 
					        <!-- Textarea. -->
 | 
				
			||||||
        <ion-item *ngIf="essayQuestion.textarea && (!essayQuestion.hasDraftFiles || uploadFilesSupported)">
 | 
					        <ion-item *ngIf="essayQuestion.textarea && (!essayQuestion.hasDraftFiles || uploadFilesSupported)">
 | 
				
			||||||
            <ion-label></ion-label>
 | 
					            <ion-label class="sr-only">{{ 'core.question.answer' | translate }}</ion-label>
 | 
				
			||||||
            <!-- "Format" and draftid hidden inputs -->
 | 
					            <!-- "Format" and draftid hidden inputs -->
 | 
				
			||||||
            <input *ngIf="essayQuestion.formatInput" type="hidden" [name]="essayQuestion.formatInput.name"
 | 
					            <input *ngIf="essayQuestion.formatInput" type="hidden" [name]="essayQuestion.formatInput.name"
 | 
				
			||||||
                [value]="essayQuestion.formatInput.value" >
 | 
					                [value]="essayQuestion.formatInput.value" >
 | 
				
			||||||
 | 
				
			|||||||
@ -57,6 +57,7 @@ export class CoreChartComponent implements OnDestroy, OnInit, OnChanges {
 | 
				
			|||||||
    @ViewChild('canvas') canvas?: ElementRef<HTMLCanvasElement>;
 | 
					    @ViewChild('canvas') canvas?: ElementRef<HTMLCanvasElement>;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    chart?: ChartWithLegend;
 | 
					    chart?: ChartWithLegend;
 | 
				
			||||||
 | 
					    legendItems: ChartLegendLabelItem[] = [];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * @inheritdoc
 | 
					     * @inheritdoc
 | 
				
			||||||
@ -105,6 +106,8 @@ export class CoreChartComponent implements OnDestroy, OnInit, OnChanges {
 | 
				
			|||||||
            },
 | 
					            },
 | 
				
			||||||
            options: { legend },
 | 
					            options: { legend },
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        this.updateLegendItems();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
@ -126,6 +129,8 @@ export class CoreChartComponent implements OnDestroy, OnInit, OnChanges {
 | 
				
			|||||||
        };
 | 
					        };
 | 
				
			||||||
        this.chart.data.labels = this.labels;
 | 
					        this.chart.data.labels = this.labels;
 | 
				
			||||||
        this.chart.update();
 | 
					        this.chart.update();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        this.updateLegendItems();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
@ -179,6 +184,13 @@ export class CoreChartComponent implements OnDestroy, OnInit, OnChanges {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Recompute legendItems property.
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    protected updateLegendItems(): void {
 | 
				
			||||||
 | 
					        this.legendItems = (this.chart?.legend?.legendItems ?? []).filter(item => !!item);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// For some reason the legend property isn't defined in TS, define it ourselves.
 | 
					// For some reason the legend property isn't defined in TS, define it ourselves.
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
<canvas #canvas [attr.height]="height"></canvas>
 | 
					<canvas #canvas [attr.height]="height"></canvas>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<ion-list *ngIf="chart">
 | 
					<ion-list *ngIf="chart">
 | 
				
			||||||
    <ion-item *ngFor="let data of chart.legend!.legendItems">
 | 
					    <ion-item *ngFor="let data of legendItems">
 | 
				
			||||||
        <ion-icon name="fas-square" slot="start" [style.color]="data.fillStyle" aria-hidden="true"></ion-icon>
 | 
					        <ion-icon name="fas-square" slot="start" [style.color]="data.fillStyle" aria-hidden="true"></ion-icon>
 | 
				
			||||||
        <ion-label>{{data.text}}</ion-label>
 | 
					        <ion-label>{{data.text}}</ion-label>
 | 
				
			||||||
    </ion-item>
 | 
					    </ion-item>
 | 
				
			||||||
 | 
				
			|||||||
@ -12,7 +12,7 @@
 | 
				
			|||||||
<ion-content class="ion-padding">
 | 
					<ion-content class="ion-padding">
 | 
				
			||||||
    <form (ngSubmit)="submitPassword($event)" #enrolPasswordForm>
 | 
					    <form (ngSubmit)="submitPassword($event)" #enrolPasswordForm>
 | 
				
			||||||
        <ion-item>
 | 
					        <ion-item>
 | 
				
			||||||
            <ion-label></ion-label>
 | 
					            <ion-label class="sr-only">{{ 'core.courses.password' | translate }}</ion-label>
 | 
				
			||||||
            <core-show-password name="password">
 | 
					            <core-show-password name="password">
 | 
				
			||||||
                <ion-input
 | 
					                <ion-input
 | 
				
			||||||
                    class="ion-text-wrap core-ioninput-password"
 | 
					                    class="ion-text-wrap core-ioninput-password"
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
<ion-header>
 | 
					<ion-header>
 | 
				
			||||||
    <ion-toolbar>
 | 
					    <ion-toolbar>
 | 
				
			||||||
        <ion-buttons slot="start">
 | 
					        <ion-buttons slot="start">
 | 
				
			||||||
            <ion-back-button></ion-back-button>
 | 
					            <ion-back-button [text]="'core.back' | translate"></ion-back-button>
 | 
				
			||||||
        </ion-buttons>
 | 
					        </ion-buttons>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <h1>{{ 'core.login.login' | translate }}</h1>
 | 
					        <h1>{{ 'core.login.login' | translate }}</h1>
 | 
				
			||||||
 | 
				
			|||||||
@ -29,7 +29,7 @@
 | 
				
			|||||||
                </ion-item>
 | 
					                </ion-item>
 | 
				
			||||||
            </ion-radio-group>
 | 
					            </ion-radio-group>
 | 
				
			||||||
            <ion-item>
 | 
					            <ion-item>
 | 
				
			||||||
                <ion-label></ion-label>
 | 
					                <ion-label class="sr-only">{{ 'core.login.usernameoremail' | translate }}</ion-label>
 | 
				
			||||||
                <ion-input type="text" name="value" placeholder="{{ 'core.login.usernameoremail' | translate }}"
 | 
					                <ion-input type="text" name="value" placeholder="{{ 'core.login.usernameoremail' | translate }}"
 | 
				
			||||||
                    formControlName="value" autocapitalize="none" autocorrect="off" [core-auto-focus]="autoFocus">
 | 
					                    formControlName="value" autocapitalize="none" autocorrect="off" [core-auto-focus]="autoFocus">
 | 
				
			||||||
                </ion-input>
 | 
					                </ion-input>
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
<ion-header>
 | 
					<ion-header>
 | 
				
			||||||
    <ion-toolbar>
 | 
					    <ion-toolbar>
 | 
				
			||||||
        <ion-buttons slot="start">
 | 
					        <ion-buttons slot="start">
 | 
				
			||||||
            <ion-back-button></ion-back-button>
 | 
					            <ion-back-button [text]="'core.back' | translate"></ion-back-button>
 | 
				
			||||||
        </ion-buttons>
 | 
					        </ion-buttons>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <h1>{{ 'core.login.reconnect' | translate }}</h1>
 | 
					        <h1>{{ 'core.login.reconnect' | translate }}</h1>
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user