diff --git a/src/addons/mod/assign/components/index/addon-mod-assign-index.html b/src/addons/mod/assign/components/index/addon-mod-assign-index.html
index 3a5789600..15a9190fb 100644
--- a/src/addons/mod/assign/components/index/addon-mod-assign-index.html
+++ b/src/addons/mod/assign/components/index/addon-mod-assign-index.html
@@ -96,7 +96,13 @@
{{ 'addon.mod_assign.numberofparticipants' | translate }}
- {{ summary.participantcount }}
+ {{ summary.participantcount }}
+
+ {{ 'addon.mod_assign.numberofparticipantscountdescription' | translate:{count: summary.participantcount} }}
+
+
+ {{ 'addon.mod_assign.numberofteamscountdescription' | translate:{count: summary.participantcount} }}
+
@@ -107,7 +113,11 @@
(click)="goToSubmissionList(submissionStatusDraft, !!summary.submissiondraftscount)">
{{ 'addon.mod_assign.numberofdraftsubmissions' | translate }}
- {{ summary.submissiondraftscount }}
+ {{ summary.submissiondraftscount }}
+
+ {{ 'addon.mod_assign.numberofdraftsubmissionscountdescription' | translate:
+ {count: summary.submissiondraftscount} }}
+
@@ -118,7 +128,11 @@
(click)="goToSubmissionList(submissionStatusSubmitted, !!summary.submissionssubmittedcount)">
{{ 'addon.mod_assign.numberofsubmittedassignments' | translate }}
- {{ summary.submissionssubmittedcount }}
+ {{ summary.submissionssubmittedcount }}
+
+ {{ 'addon.mod_assign.numberofsubmittedassignmentscountdescription' | translate:
+ {count: summary.submissionssubmittedcount} }}
+
@@ -128,7 +142,11 @@
(click)="goToSubmissionList(needGrading, needsGradingAvailable)">
{{ 'addon.mod_assign.numberofsubmissionsneedgrading' | translate }}
- {{ summary.submissionsneedgradingcount }}
+ {{ summary.submissionsneedgradingcount }}
+
+ {{ 'addon.mod_assign.numberofsubmissionsneedgradingcountdescription' | translate:
+ {count: summary.submissionsneedgradingcount} }}
+
diff --git a/src/addons/mod/assign/lang.json b/src/addons/mod/assign/lang.json
index 37a598c17..c580f3a80 100644
--- a/src/addons/mod/assign/lang.json
+++ b/src/addons/mod/assign/lang.json
@@ -64,10 +64,15 @@
"noteam_desc": "This assignment requires submission in groups. You are not a member of any group, so you cannot create a submission. Please contact your teacher to be added to a group.",
"notgraded": "Not graded",
"numberofdraftsubmissions": "Drafts",
+ "numberofdraftsubmissionscountdescription": "There are {{count}} drafts.",
"numberofparticipants": "Participants",
+ "numberofparticipantscountdescription": "There are {{count}} participants.",
"numberofsubmittedassignments": "Submitted",
+ "numberofsubmittedassignmentscountdescription": "There are {{count}} submitted assignments.",
"numberofsubmissionsneedgrading": "Needs grading",
+ "numberofsubmissionsneedgradingcountdescription": "There are {{count}} submissions that need grading.",
"numberofteams": "Groups",
+ "numberofteamscountdescription": "There are {{count}} teams.",
"numwords": "{{$a}} words",
"outof": "{{$a.current}} out of {{$a.total}}",
"overdue": "Assignment is overdue by: {{$a}}",
diff --git a/src/addons/mod/feedback/components/index/addon-mod-feedback-index.html b/src/addons/mod/feedback/components/index/addon-mod-feedback-index.html
index 0a905bc40..ccb014c3f 100644
--- a/src/addons/mod/feedback/components/index/addon-mod-feedback-index.html
+++ b/src/addons/mod/feedback/components/index/addon-mod-feedback-index.html
@@ -78,7 +78,12 @@
{{ 'addon.mod_feedback.completed_feedbacks' | translate }}
- {{completedCount}}
+
+ {{completedCount}}
+
+ {{ 'addon.mod_feedback.completedfeedbackscountdescription' | translate:{count: completedCount} }}
+
+
@@ -90,7 +95,12 @@
{{ 'addon.mod_feedback.questions' | translate }}
- {{itemsCount}}
+
+ {{itemsCount}}
+
+ {{ 'addon.mod_feedback.questionscountdescription' | translate:{count: itemsCount} }}
+
+
diff --git a/src/addons/mod/feedback/lang.json b/src/addons/mod/feedback/lang.json
index 5e6381eb3..8d575a97b 100644
--- a/src/addons/mod/feedback/lang.json
+++ b/src/addons/mod/feedback/lang.json
@@ -6,6 +6,7 @@
"captchaofflinewarning": "Feedback with CAPTCHA cannot be completed offline, or if not configured, or if the server is down.",
"complete_the_form": "Answer the questions",
"completed_feedbacks": "Submitted answers",
+ "completedfeedbackscountdescription": "There are {{count}} submitted answers.",
"continue_the_form": "Continue answering the questions",
"feedback_is_not_open": "The feedback is not open",
"feedback_submitted_offline": "This feedback has been saved to be submitted later.",
@@ -28,6 +29,7 @@
"preview": "Preview",
"previous_page": "Previous page",
"questions": "Questions",
+ "questionscountdescription": "There are {{count}} questions.",
"response_nr": "Response number",
"responses": "Responses",
"save_entries": "Submit your answers",
@@ -35,4 +37,4 @@
"show_nonrespondents": "Show non-respondents",
"started": "Started",
"this_feedback_is_already_submitted": "You've already completed this activity."
-}
\ No newline at end of file
+}
diff --git a/src/addons/mod/forum/components/index/index.html b/src/addons/mod/forum/components/index/index.html
index e79488e3d..677ba239c 100644
--- a/src/addons/mod/forum/components/index/index.html
+++ b/src/addons/mod/forum/components/index/index.html
@@ -142,9 +142,11 @@
{{ 'addon.mod_forum.numreplies' | translate:{numreplies: discussion.numreplies} }}
-
- {{ discussion.numunread }}
+
+ {{ discussion.numunread }}
+
+ {{ 'addon.mod_forum.unreadpostsnumber' | translate:{ '$a' : discussion.numunread} }}
+
diff --git a/src/core/classes/tabs.ts b/src/core/classes/tabs.ts
index 190e754f4..92f76b076 100644
--- a/src/core/classes/tabs.ts
+++ b/src/core/classes/tabs.ts
@@ -670,5 +670,6 @@ export type CoreTabBase = {
icon?: string; // The tab icon.
badge?: string; // A badge to add in the tab.
badgeStyle?: string; // The badge color.
+ badgeA11yText?: string; // Accessibility text to add on the badge.
enabled?: boolean; // Whether the tab is enabled.
};
diff --git a/src/core/components/context-menu/context-menu-item.ts b/src/core/components/context-menu/context-menu-item.ts
index 42eee0c8d..10e9da41d 100644
--- a/src/core/components/context-menu/context-menu-item.ts
+++ b/src/core/components/context-menu/context-menu-item.ts
@@ -50,6 +50,7 @@ export class CoreContextMenuItemComponent implements OnInit, OnDestroy, OnChange
@Input() priority?: number; // Used to sort items. The highest priority, the highest position.
@Input() badge?: string; // A badge to show in the item.
@Input() badgeClass?: number; // A class to set in the badge.
+ @Input() badgeA11yText?: string; // Description for the badge, if needed.
@Input() hidden?: boolean; // Whether the item should be hidden.
@Output() action?: EventEmitter<() => void>; // Will emit an event when the item clicked.
@Output() onClosed?: EventEmitter<() => void>; // Will emit an event when the popover is closed because the item was clicked.
diff --git a/src/core/components/context-menu/core-context-menu-popover.html b/src/core/components/context-menu/core-context-menu-popover.html
index 98a46c630..64a3bacf2 100644
--- a/src/core/components/context-menu/core-context-menu-popover.html
+++ b/src/core/components/context-menu/core-context-menu-popover.html
@@ -12,6 +12,11 @@
[class.icon-slash]="item.iconSlash" slot="end">
- {{item.badge}}
+
+ {{item.badge}}
+
+ {{ item.badgeA11yText | translate: {$a : item.badge } }}
+
+
diff --git a/src/core/components/tabs-outlet/core-tabs-outlet.html b/src/core/components/tabs-outlet/core-tabs-outlet.html
index c6963585f..a7d721128 100644
--- a/src/core/components/tabs-outlet/core-tabs-outlet.html
+++ b/src/core/components/tabs-outlet/core-tabs-outlet.html
@@ -30,7 +30,12 @@
>
{{ tab.title | translate}}
- {{ tab.badge }}
+
+ {{ tab.badge }}
+
+ {{ tab.badgeA11yText | translate: {$a : tab.badge } }}
+
+
diff --git a/src/core/components/tabs/core-tabs.html b/src/core/components/tabs/core-tabs.html
index c15340c3d..940758613 100644
--- a/src/core/components/tabs/core-tabs.html
+++ b/src/core/components/tabs/core-tabs.html
@@ -28,7 +28,12 @@
>
{{ tab.title | translate}}
- {{ tab.badge }}
+
+ {{ tab.badge }}
+
+ {{ tab.badgeA11yText | translate: {$a : tab.badge } }}
+
+
diff --git a/src/core/components/tabs/tab.ts b/src/core/components/tabs/tab.ts
index dcd9c1f71..8f11dd03e 100644
--- a/src/core/components/tabs/tab.ts
+++ b/src/core/components/tabs/tab.ts
@@ -49,6 +49,7 @@ export class CoreTabComponent implements OnInit, OnDestroy, CoreTabBase {
@Input() icon?: string; // The tab icon.
@Input() badge?: string; // A badge to add in the tab.
@Input() badgeStyle?: string; // The badge color.
+ @Input() badgeA11yText?: string; // Accessibility text to add on the badge.
@Input() class?: string; // Class, if needed.
@Input() set enabled(value: boolean) { // Whether the tab should be shown.
value = value === undefined ? true : value;
diff --git a/src/core/features/course/components/format/core-course-format.html b/src/core/features/course/components/format/core-course-format.html
index 50e81e8e7..9b98dc61d 100644
--- a/src/core/features/course/components/format/core-course-format.html
+++ b/src/core/features/course/components/format/core-course-format.html
@@ -158,7 +158,9 @@
0 && section.count < section.total">
+ *ngIf="section.isDownloading && section.total > 0 && section.count < section.total" role="progressbar"
+ aria-valuemin="0" [attr.aria-valuemax]="section.total" [attr.aria-valuenow]="section.count"
+ [attr.aria-valuetext]="'core.course.downloadsectionprogressdescription' | translate:section">
{{section.count}} / {{section.total}}
diff --git a/src/core/features/course/lang.json b/src/core/features/course/lang.json
index 54dac5574..835de1253 100644
--- a/src/core/features/course/lang.json
+++ b/src/core/features/course/lang.json
@@ -30,6 +30,8 @@
"couldnotloadsections": "Could not load the sections. Please try again later.",
"coursesummary": "Course summary",
"downloadcourse": "Download course",
+ "downloadcoursesprogressdescription": "Downloading courses: downloaded {{count}} out of {{total}}.",
+ "downloadsectionprogressdescription": "Downloading section: downloaded {{count}} out of {{total}}.",
"errordownloadingcourse": "Error downloading course.",
"errordownloadingsection": "Error downloading section.",
"errorgetmodule": "Error getting activity data.",
diff --git a/src/core/features/course/services/course-helper.ts b/src/core/features/course/services/course-helper.ts
index c85ffd0a0..b0f1e8f69 100644
--- a/src/core/features/course/services/course-helper.ts
+++ b/src/core/features/course/services/course-helper.ts
@@ -135,6 +135,9 @@ export type CorePrefetchStatusInfo = {
icon: string; // Icon based on the status.
loading: boolean; // If it's a loading status.
badge?: string; // Progress badge string if any.
+ badgeA11yText?: string; // Description of the badge if any.
+ count?: number; // Amount of already downloaded courses.
+ total?: number; // Total of courses.
downloadSucceeded?: boolean; // Whether download has succeeded (in case it's downloaded).
};
@@ -1235,6 +1238,9 @@ export class CoreCourseHelperProvider {
try {
await this.confirmAndPrefetchCourses(courses, (progress) => {
prefetch.badge = progress.count + ' / ' + progress.total;
+ prefetch.badgeA11yText = Translate.instant('core.course.downloadcoursesprogressdescription', progress);
+ prefetch.count = progress.count;
+ prefetch.total = progress.total;
});
prefetch.icon = CoreConstants.ICON_OUTDATED;
} finally {
diff --git a/src/core/features/courses/lang.json b/src/core/features/courses/lang.json
index 6323f3023..668442a99 100644
--- a/src/core/features/courses/lang.json
+++ b/src/core/features/courses/lang.json
@@ -40,5 +40,6 @@
"selfenrolment": "Self enrolment",
"sendpaymentbutton": "Send payment via PayPal",
"show": "Restore to view",
+ "therearecourses": "There are {{$a}} courses",
"totalcoursesearchresults": "Total courses: {{$a}}"
}
diff --git a/src/core/features/courses/pages/categories/categories.html b/src/core/features/courses/pages/categories/categories.html
index e1216beb6..269573fc2 100644
--- a/src/core/features/courses/pages/categories/categories.html
+++ b/src/core/features/courses/pages/categories/categories.html
@@ -48,7 +48,10 @@
- 0" color="light">{{category.coursecount}}
+ 0" color="light">
+ {{ category.coursecount }}
+ {{ 'core.courses.therearecourses' | translate:{ $a: category.coursecount } }}
+
diff --git a/src/core/features/courses/pages/my-courses/my-courses.html b/src/core/features/courses/pages/my-courses/my-courses.html
index b0e57f1c8..1fb2aa745 100644
--- a/src/core/features/courses/pages/my-courses/my-courses.html
+++ b/src/core/features/courses/pages/my-courses/my-courses.html
@@ -20,7 +20,10 @@
[attr.aria-label]="'core.loading' | translate">
{{downloadAllCoursesBadge}}
+ role="progressbar" aria-valuemin="0" [attr.aria-valuemax]="downloadAllCoursesTotal"
+ [attr.aria-valuenow]="downloadAllCoursesCount" [attr.aria-valuetext]="downloadAllCoursesBadgeA11yText">
+ {{downloadAllCoursesBadge}}
+