Skip to content
Browse files

MDL-41252 Simple changes to main course page to improve accessibility…

… - original patch of Nate Baxley
  • Loading branch information...
1 parent c777836 commit e0b8bc0a08457463fc2f533f94d5f58d8bd04449 @mouneyrac mouneyrac committed Oct 8, 2013
Showing with 5 additions and 3 deletions.
  1. +5 −3 course/format/renderer.php
View
8 course/format/renderer.php
@@ -157,7 +157,8 @@ protected function section_header($section, $course, $onsectionpage, $sectionret
}
$o.= html_writer::start_tag('li', array('id' => 'section-'.$section->section,
- 'class' => 'section main clearfix'.$sectionstyle));
+ 'class' => 'section main clearfix'.$sectionstyle, 'role'=>'region',
+ 'aria-label'=> get_section_name($course, $section)));
$leftcontent = $this->section_left_content($section, $course, $onsectionpage);
$o.= html_writer::tag('div', $leftcontent, array('class' => 'left side'));
@@ -301,14 +302,15 @@ protected function section_summary($section, $course, $mods) {
$classattr .= ' current';
}
+ $title = get_section_name($course, $section);
$o = '';
- $o .= html_writer::start_tag('li', array('id' => 'section-'.$section->section, 'class' => $classattr));
+ $o .= html_writer::start_tag('li', array('id' => 'section-'.$section->section,
+ 'class' => $classattr, 'role'=>'region', 'aria-label'=> $title));
$o .= html_writer::tag('div', '', array('class' => 'left side'));
$o .= html_writer::tag('div', '', array('class' => 'right side'));
$o .= html_writer::start_tag('div', array('class' => 'content'));
- $title = get_section_name($course, $section);
if ($section->uservisible) {
$title = html_writer::tag('a', $title,
array('href' => course_get_url($course, $section->section), 'class' => $linkclasses));

0 comments on commit e0b8bc0

Please sign in to comment.
Something went wrong with that request. Please try again.