From b5a64bf71947fd0e593c96a55cea3817bdd3d960 Mon Sep 17 00:00:00 2001 From: Michael Hawkins Date: Mon, 30 Aug 2021 18:13:30 +0800 Subject: [PATCH] MDL-72355 calendar: Improve clarity of the imports table heading The updates string provides consistency with the main page heading. This commit also improves accessibility by setting the heading as the aria-describedby element for the table which it is describing. --- calendar/renderer.php | 6 +++++- lang/en/calendar.php | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/calendar/renderer.php b/calendar/renderer.php index c7ba089a80d..6c26be2d2e9 100644 --- a/calendar/renderer.php +++ b/calendar/renderer.php @@ -327,7 +327,11 @@ class core_calendar_renderer extends plugin_renderer_base { $exportcalendarbutton->class .= ' float-sm-right float-right'; $output = $this->output->heading(get_string('managesubscriptions', 'calendar')); $output .= html_writer::start_div('header d-flex flex-wrap mt-5'); - $output .= html_writer::tag('h3', get_string('yoursubscriptions', 'calendar'), ['class' => 'mr-auto']); + $headerattr = [ + 'class' => 'mr-auto', + 'aria-describedby' => 'subscription_details_table', + ]; + $output .= html_writer::tag('h3', get_string('yoursubscriptions', 'calendar'), $headerattr); $output .= $this->output->render($importcalendarbutton); $output .= $this->output->render($exportcalendarbutton); $output .= html_writer::end_div(); diff --git a/lang/en/calendar.php b/lang/en/calendar.php index df7749d2355..73a16904de9 100644 --- a/lang/en/calendar.php +++ b/lang/en/calendar.php @@ -279,7 +279,7 @@ $string['when'] = 'When'; $string['whendate'] = 'When: {$a}'; $string['yesterday'] = 'Yesterday'; $string['youcandeleteallrepeats'] = 'This event is part of a repeating event series. You can delete this event only, or all {$a} events in the series at once.'; -$string['yoursubscriptions'] = 'Your subscriptions'; +$string['yoursubscriptions'] = 'Imported calendars'; // Deprecated since Moodle 4.0. $string['calendarurl'] = 'Calendar URL: {$a}';