mirror of
https://github.com/moodle/moodle.git
synced 2025-03-23 17:10:20 +01:00
MDL-76597 mod_quiz: Set presentation role for the question list
Since the <ul> and <li> elements for listing the quiz questions and elements are mainly used for layout purposes, it is better to set the role of these elements to presentation only. The aria-label for the <li> element is inappropriate and can also cause confusion to screen reader users. Better to remove this. Though this is being used in the confirmation modal so better to just change it to a data attribute.
This commit is contained in:
parent
d2bacb04ff
commit
6a7668e350
@ -404,7 +404,8 @@ class edit_renderer extends \plugin_renderer_base {
|
||||
}
|
||||
|
||||
$output .= html_writer::start_tag('li', array('id' => 'section-'.$section->id,
|
||||
'class' => 'section main clearfix'.$sectionstyle, 'role' => 'presentation'));
|
||||
'class' => 'section main clearfix'.$sectionstyle, 'role' => 'presentation',
|
||||
'data-sectionname' => $sectionheadingtext));
|
||||
|
||||
$output .= html_writer::start_div('content');
|
||||
|
||||
|
@ -929,7 +929,7 @@ Y.extend(SECTIONTOOLBOX, TOOLBOX, {
|
||||
|
||||
// Create the confirmation dialogue.
|
||||
var confirm = new M.core.confirm({
|
||||
question: M.util.get_string('confirmremovesectionheading', 'quiz', activity.get('aria-label')),
|
||||
question: M.util.get_string('confirmremovesectionheading', 'quiz', activity.getData('sectionname')),
|
||||
modal: true
|
||||
});
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@ -929,7 +929,7 @@ Y.extend(SECTIONTOOLBOX, TOOLBOX, {
|
||||
|
||||
// Create the confirmation dialogue.
|
||||
var confirm = new M.core.confirm({
|
||||
question: M.util.get_string('confirmremovesectionheading', 'quiz', activity.get('aria-label')),
|
||||
question: M.util.get_string('confirmremovesectionheading', 'quiz', activity.getData('sectionname')),
|
||||
modal: true
|
||||
});
|
||||
|
||||
|
2
mod/quiz/yui/src/toolboxes/js/section.js
vendored
2
mod/quiz/yui/src/toolboxes/js/section.js
vendored
@ -113,7 +113,7 @@ Y.extend(SECTIONTOOLBOX, TOOLBOX, {
|
||||
|
||||
// Create the confirmation dialogue.
|
||||
var confirm = new M.core.confirm({
|
||||
question: M.util.get_string('confirmremovesectionheading', 'quiz', activity.get('aria-label')),
|
||||
question: M.util.get_string('confirmremovesectionheading', 'quiz', activity.getData('sectionname')),
|
||||
modal: true
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user