Implements hook_preprocess_HOOK() for block.html.twig.
function menu_preprocess_block(&$variables) { if ($variables['configuration']['module'] == 'menu') { $variables['attributes']['role'] = 'navigation'; } }