MDL-41615 quiz_mod: fix heading levels for usability and accessibility

This commit is contained in:
rwijaya 2013-11-05 18:52:24 +08:00
parent d214057cad
commit c544ee92f5
23 changed files with 86 additions and 32 deletions

View file

@ -138,7 +138,7 @@ class core_question_renderer extends plugin_renderer_base {
if (!$numbertext) {
return '';
}
return html_writer::tag('h2', $numbertext, array('class' => 'no'));
return html_writer::tag('h3', $numbertext, array('class' => 'no'));
}
/**
@ -150,7 +150,7 @@ class core_question_renderer extends plugin_renderer_base {
*/
protected function add_part_heading($heading, $content) {
if ($content) {
$content = html_writer::tag('h3', $heading, array('class' => 'accesshide')) . $content;
$content = html_writer::tag('h4', $heading, array('class' => 'accesshide')) . $content;
}
return $content;
}
@ -456,7 +456,7 @@ class core_question_renderer extends plugin_renderer_base {
$table->data[] = $row;
}
return html_writer::tag('h3', get_string('responsehistory', 'question'),
return html_writer::tag('h4', get_string('responsehistory', 'question'),
array('class' => 'responsehistoryheader')) . html_writer::tag('div',
html_writer::table($table, true), array('class' => 'responsehistoryheader'));
}

View file

@ -10,6 +10,9 @@ question_engine::is_manual_grade_in_range.
($qa, $options) to ($qa, $behaviouroutput, $options). If you have overridden
that method you will need to update your code.
3) Heading level for number(), add_part_heading() and respond_history()
has been lowered by one level. These changes are part of improving the page
accessibility and making heading to have proper nesting. (MDL-41615)
=== Earlier changes ===