MDL-73584 lib: Remove role menubar from Actions menu
The menubar role defined in the "menubar d-flex" element is not required and it's causing the following error "Required ARIA children role not present: group, menuitemradio, menuitem, menuitemcheckbox".
This commit is contained in:
@@ -378,6 +378,10 @@ class core_course_management_renderer extends plugin_renderer_base {
|
||||
if (!$hasitems) {
|
||||
return '';
|
||||
}
|
||||
|
||||
// If the action menu has items, add the menubar role to the main element containing it.
|
||||
$menu->attributes['role'] = 'menubar';
|
||||
|
||||
return $this->render($menu);
|
||||
}
|
||||
|
||||
|
||||
@@ -4237,7 +4237,6 @@ class action_menu implements renderable, templatable {
|
||||
$this->attributesprimary = array(
|
||||
'id' => 'action-menu-'.$this->instance.'-menubar',
|
||||
'class' => 'menubar',
|
||||
'role' => 'menubar'
|
||||
);
|
||||
$this->attributessecondary = array(
|
||||
'id' => 'action-menu-'.$this->instance.'-menu',
|
||||
|
||||
Reference in New Issue
Block a user