mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-67874 theme_boost: make focus outline accessible
This commit is contained in:
parent
8aa0f2c4d8
commit
91de0ed823
30 changed files with 473 additions and 97 deletions
|
@ -272,7 +272,7 @@ class core_course_management_renderer extends plugin_renderer_base {
|
|||
$html .= html_writer::end_div();
|
||||
$html .= $icon;
|
||||
if ($hasactions) {
|
||||
$textattributes = array('class' => 'float-left categoryname');
|
||||
$textattributes = array('class' => 'float-left categoryname aalink');
|
||||
} else {
|
||||
$textattributes = array('class' => 'float-left categoryname without-actions');
|
||||
}
|
||||
|
@ -647,7 +647,7 @@ class core_course_management_renderer extends plugin_renderer_base {
|
|||
'for' => 'courselistitem' . $course->id));
|
||||
$html .= html_writer::end_div();
|
||||
$html .= html_writer::end_div();
|
||||
$html .= html_writer::link($viewcourseurl, $text, array('class' => 'float-left coursename'));
|
||||
$html .= html_writer::link($viewcourseurl, $text, array('class' => 'float-left coursename aalink'));
|
||||
$html .= html_writer::start_div('float-right');
|
||||
if ($course->idnumber) {
|
||||
$html .= html_writer::tag('span', s($course->idnumber), array('class' => 'text-muted idnumber'));
|
||||
|
@ -1222,7 +1222,7 @@ class core_course_management_renderer extends plugin_renderer_base {
|
|||
$html .= html_writer::end_div();
|
||||
}
|
||||
$html .= html_writer::end_div();
|
||||
$html .= html_writer::link($viewcourseurl, $text, array('class' => 'float-left coursename'));
|
||||
$html .= html_writer::link($viewcourseurl, $text, array('class' => 'float-left coursename aalink'));
|
||||
$html .= html_writer::tag('span', $categoryname, array('class' => 'float-left ml-3 text-muted'));
|
||||
$html .= html_writer::start_div('float-right');
|
||||
$html .= $this->search_listitem_actions($course);
|
||||
|
|
|
@ -709,7 +709,7 @@ class core_course_renderer extends plugin_renderer_base {
|
|||
'class' => 'iconlarge activityicon', 'alt' => '', 'role' => 'presentation', 'aria-hidden' => 'true')) .
|
||||
html_writer::tag('span', $instancename . $altname, array('class' => 'instancename'));
|
||||
if ($mod->uservisible) {
|
||||
$output .= html_writer::link($url, $activitylink, array('class' => $linkclasses, 'onclick' => $onclick));
|
||||
$output .= html_writer::link($url, $activitylink, array('class' => 'aalink' . $linkclasses, 'onclick' => $onclick));
|
||||
} else {
|
||||
// We may be displaying this just in order to show information
|
||||
// about visibility, without the actual link ($mod->is_visible_on_course_page()).
|
||||
|
@ -1142,7 +1142,7 @@ class core_course_renderer extends plugin_renderer_base {
|
|||
}
|
||||
$coursename = $chelper->get_course_formatted_name($course);
|
||||
$coursenamelink = html_writer::link(new moodle_url('/course/view.php', ['id' => $course->id]),
|
||||
$coursename, ['class' => $course->visible ? '' : 'dimmed']);
|
||||
$coursename, ['class' => $course->visible ? 'aalink' : 'aalink dimmed']);
|
||||
$content .= html_writer::tag($nametag, $coursenamelink, ['class' => 'coursename']);
|
||||
// If we display course in collapsed form but the course has summary or course contacts, display the link to the info page.
|
||||
$content .= html_writer::start_tag('div', ['class' => 'moreinfo']);
|
||||
|
@ -1648,7 +1648,7 @@ class core_course_renderer extends plugin_renderer_base {
|
|||
}
|
||||
$content .= html_writer::start_tag('div', array('class' => 'info'));
|
||||
|
||||
$content .= html_writer::tag(($depth > 1) ? 'h4' : 'h3', $categoryname, array('class' => 'categoryname'));
|
||||
$content .= html_writer::tag(($depth > 1) ? 'h4' : 'h3', $categoryname, array('class' => 'categoryname aabtn'));
|
||||
$content .= html_writer::end_tag('div'); // .info
|
||||
|
||||
// add category content to the output
|
||||
|
@ -1682,7 +1682,7 @@ class core_course_renderer extends plugin_renderer_base {
|
|||
|
||||
if ($coursecat->get_children_count()) {
|
||||
$classes = array(
|
||||
'collapseexpand',
|
||||
'collapseexpand', 'aabtn'
|
||||
);
|
||||
|
||||
// Check if the category content contains subcategories with children's content loaded.
|
||||
|
@ -2391,7 +2391,7 @@ class core_course_renderer extends plugin_renderer_base {
|
|||
}
|
||||
$output = html_writer::link('#' . $skipdivid,
|
||||
get_string('skipa', 'access', core_text::strtolower(strip_tags($header))),
|
||||
array('class' => 'skip-block skip'));
|
||||
array('class' => 'skip-block skip aabtn'));
|
||||
|
||||
// Wrap frontpage part in div container.
|
||||
$output .= html_writer::start_tag('div', array('id' => $contentsdivid));
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
</div>
|
||||
{{/showshortname}}
|
||||
</div>
|
||||
<a href="{{viewurl}}" class="coursename mr-2">
|
||||
<a href="{{viewurl}}" class="aalink coursename mr-2">
|
||||
{{> core_course/favouriteicon }}
|
||||
<span class="sr-only">
|
||||
{{#str}}aria:coursename, core_course{{/str}}
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
"icon": "<img class='icon' src='http://urltooptionicon'>"
|
||||
}
|
||||
}}
|
||||
<div role="menuitem" tabindex="-1" aria-label="{{title}}" class="option d-block text-center py-1 mb-1" data-region="chooser-option-container" data-internal="{{name}}" data-modname="{{componentname}}_{{link}}">
|
||||
<div role="menuitem" tabindex="-1" aria-label="{{title}}" class="option d-block text-center py-1 mb-1 aabtn" data-region="chooser-option-container" data-internal="{{name}}" data-modname="{{componentname}}_{{link}}">
|
||||
<div class="optioninfo w-100" data-region="chooser-option-info-container">
|
||||
<a class="d-block" href="{{link}}" title="{{#str}} addnew, moodle, {{title}} {{/str}}" tabindex="-1" data-action="add-chooser-option">
|
||||
<span class="optionicon d-block">
|
||||
|
|
|
@ -1883,7 +1883,8 @@ class behat_course extends behat_base {
|
|||
|
||||
$exception = new ExpectationException('"' . $categoryname . '" category can not be found', $this->getSession());
|
||||
$categoryliteral = behat_context_helper::escape($categoryname);
|
||||
$xpath = "//div[@class='info']/descendant::*[" . implode(' or ', $headingtags) . "][@class='categoryname'][./descendant::a[.=$categoryliteral]]";
|
||||
$xpath = "//div[@class='info']/descendant::*[" . implode(' or ', $headingtags) .
|
||||
"][contains(@class,'categoryname')][./descendant::a[.=$categoryliteral]]";
|
||||
$node = $this->find('xpath', $xpath, $exception);
|
||||
$node->click();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue