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:
Sara Arjona
2022-01-17 12:51:20 +01:00
parent 62f859ed24
commit edfcc33471
2 changed files with 4 additions and 1 deletions
+4
View File
@@ -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);
}
-1
View File
@@ -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',