diff --git a/core/modules/toolbar/templates/toolbar.html.twig b/core/modules/toolbar/templates/toolbar.html.twig index 2c9e679d7b7028f342c357d36ce0fa68da6a4b98..cb82774b8603014b08a8884053082b9558a9acc7 100644 --- a/core/modules/toolbar/templates/toolbar.html.twig +++ b/core/modules/toolbar/templates/toolbar.html.twig @@ -31,11 +31,13 @@ {{ tab.link }} {% spaceless %} <div{{ tray.attributes }}> - <nav class="toolbar-lining clearfix" role="navigation"> - {% if tray.label %} + {% if tray.label %} + <nav class="toolbar-lining clearfix" role="navigation" aria-label="{{ tray.label }}"> <h3 class="toolbar-tray-name visually-hidden">{{ tray.label }}</h3> - {% endif %} - {{ tray.links }} + {% else %} + <nav class="toolbar-lining clearfix" role="navigation"> + {% endif %} + {{ tray.links }} </nav> </div> {% endspaceless %} diff --git a/core/themes/classy/templates/navigation/toolbar.html.twig b/core/themes/classy/templates/navigation/toolbar.html.twig index a0927f7802f66f86a8f1d22c090eb127e9a7403c..20f12d48b2d4b131393123740fe6e7850a0623f0 100644 --- a/core/themes/classy/templates/navigation/toolbar.html.twig +++ b/core/themes/classy/templates/navigation/toolbar.html.twig @@ -29,11 +29,13 @@ {{ tab.link }} {% spaceless %} <div{{ tray.attributes }}> - <nav class="toolbar-lining clearfix" role="navigation"> - {% if tray.label %} + {% if tray.label %} + <nav class="toolbar-lining clearfix" role="navigation" aria-label="{{ tray.label }}"> <h3 class="toolbar-tray-name visually-hidden">{{ tray.label }}</h3> - {% endif %} - {{ tray.links }} + {% else %} + <nav class="toolbar-lining clearfix" role="navigation"> + {% endif %} + {{ tray.links }} </nav> </div> {% endspaceless %}