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.
This commit is contained in:
Michael Hawkins 2021-08-30 18:13:30 +08:00
parent 9eed82a7f5
commit b5a64bf719
2 changed files with 6 additions and 2 deletions

View File

@ -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();

View File

@ -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}';