$newsforumcontext = context_module::instance($newsforumcm->id, MUST_EXIST);
$forumname = format_string($newsforum->name, true, array('context' => $newsforumcontext));
- echo html_writer::tag('a',
+ echo html_writer::link('#',
get_string('skipa', 'access', core_text::strtolower(strip_tags($forumname))),
- array('href' => '#skipsitenews', 'class' => 'skip-block'));
+ array('data-target' => '#skipsitenews', 'class' => 'skip-block skip'));
// Wraps site news forum in div container.
echo html_writer::start_tag('div', array('id' => 'site-news-forum'));
// End site news forum div container.
echo html_writer::end_tag('div');
- echo html_writer::tag('span', '', array('class' => 'skip-block-to', 'id' => 'skipsitenews'));
+ echo html_writer::tag('span', '', array('class' => 'skip-block-to', 'id' => 'skipsitenews', 'tabindex' => '-1'));
}
break;
case FRONTPAGEENROLLEDCOURSELIST:
$mycourseshtml = $courserenderer->frontpage_my_courses();
if (!empty($mycourseshtml)) {
- echo html_writer::tag('a',
+ echo html_writer::link('#',
get_string('skipa', 'access', core_text::strtolower(get_string('mycourses'))),
- array('href' => '#skipmycourses', 'class' => 'skip-block'));
+ array('data-target' => '#skipmycourses', 'class' => 'skip skip-block'));
// Wrap frontpage course list in div container.
echo html_writer::start_tag('div', array('id' => 'frontpage-course-list'));
// End frontpage course list div container.
echo html_writer::end_tag('div');
- echo html_writer::tag('span', '', array('class' => 'skip-block-to', 'id' => 'skipmycourses'));
+ echo html_writer::tag('span', '', array('class' => 'skip-block-to', 'id' => 'skipmycourses', 'tabindex' => '-1'));
break;
}
// No "break" here. If there are no enrolled courses - continue to 'Available courses'.
case FRONTPAGEALLCOURSELIST:
$availablecourseshtml = $courserenderer->frontpage_available_courses();
if (!empty($availablecourseshtml)) {
- echo html_writer::tag('a',
+ echo html_writer::link('#',
get_string('skipa', 'access', core_text::strtolower(get_string('availablecourses'))),
- array('href' => '#skipavailablecourses', 'class' => 'skip-block'));
+ array('data-target' => '#skipavailablecourses', 'class' => 'skip skip-block'));
// Wrap frontpage course list in div container.
echo html_writer::start_tag('div', array('id' => 'frontpage-course-list'));
// End frontpage course list div container.
echo html_writer::end_tag('div');
- echo html_writer::tag('span', '', array('class' => 'skip-block-to', 'id' => 'skipavailablecourses'));
+ echo html_writer::tag('span', '', array('class' => 'skip-block-to', 'id' => 'skipavailablecourses', 'tabindex' => '-1'));
}
break;
case FRONTPAGECATEGORYNAMES:
- echo html_writer::tag('a',
+ echo html_writer::link('#',
get_string('skipa', 'access', core_text::strtolower(get_string('categories'))),
- array('href' => '#skipcategories', 'class' => 'skip-block'));
+ array('data-target' => '#skipcategories', 'class' => 'skip skip-block'));
// Wrap frontpage category names in div container.
echo html_writer::start_tag('div', array('id' => 'frontpage-category-names'));
// End frontpage category names div container.
echo html_writer::end_tag('div');
- echo html_writer::tag('span', '', array('class' => 'skip-block-to', 'id' => 'skipcategories'));
+ echo html_writer::tag('span', '', array('class' => 'skip-block-to', 'id' => 'skipcategories', 'tabindex' => '-1'));
break;
case FRONTPAGECATEGORYCOMBO:
- echo html_writer::tag('a',
+ echo html_writer::link('#',
get_string('skipa', 'access', core_text::strtolower(get_string('courses'))),
- array('href' => '#skipcourses', 'class' => 'skip-block'));
+ array('data-target' => '#skipcourses', 'class' => 'skip skip-block'));
// Wrap frontpage category combo in div container.
echo html_writer::start_tag('div', array('id' => 'frontpage-category-combo'));
// End frontpage category combo div container.
echo html_writer::end_tag('div');
- echo html_writer::tag('span', '', array('class' => 'skip-block-to', 'id' => 'skipcourses'));
+ echo html_writer::tag('span', '', array('class' => 'skip-block-to', 'id' => 'skipcourses', 'tabindex' => '-1'));
break;
case FRONTPAGECOURSESEARCH:
$output = '';
$skipdest = '';
} else {
- $output = html_writer::tag('a', get_string('skipa', 'access', $skiptitle), array('href' => '#sb-' . $bc->skipid, 'class' => 'skip-block'));
- $skipdest = html_writer::tag('span', '', array('id' => 'sb-' . $bc->skipid, 'class' => 'skip-block-to'));
+ $output = html_writer::link('#', get_string('skipa', 'access', $skiptitle),
+ array('class' => 'skip skip-block', 'id'=>'fsb-' . $bc->skipid,
+ 'data-target' => '#sb-'.$bc->skipid));
+ $skipdest = html_writer::span('', 'skip-block-to',
+ array('id' => 'sb-' . $bc->skipid, 'tabindex' => '-1'));
}
$output .= html_writer::start_tag('div', $bc->attributes);
* @return string the HTML to output.
*/
public function skip_link_target($id = null) {
- return html_writer::tag('span', '', array('id' => $id));
+ return html_writer::span('', '', array('id' => $id, 'tabindex' => '-1'));
}
/**