Skip to content
Snippets Groups Projects
Commit 27e1257a authored by Elmar Ludwig's avatar Elmar Ludwig Committed by Jan-Hendrik Willms
Browse files

replace aria-role with role, fixes #2647

Closes #2647

Merge request studip/studip!1800
parent 67ba1de2
No related branches found
No related tags found
No related merge requests found
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
STUDIP.ActionMenu.closeAll(); STUDIP.ActionMenu.closeAll();
} else if (event.key === 'Tab') { } else if (event.key === 'Tab') {
//Check if the focus is inside an action menu: //Check if the focus is inside an action menu:
let menu = $(event.target).closest('nav.action-menu'); let menu = $(event.target).closest('.action-menu');
if (menu.hasClass('is-open') && STUDIP.ActionMenu.tabThroughItems(menu, event.shiftKey)) { if (menu.hasClass('is-open') && STUDIP.ActionMenu.tabThroughItems(menu, event.shiftKey)) {
event.preventDefault(); event.preventDefault();
} }
......
...@@ -42,7 +42,7 @@ body, input, textarea, td, th, blockquote, p, form, ul, h4 { ...@@ -42,7 +42,7 @@ body, input, textarea, td, th, blockquote, p, form, ul, h4 {
#schedule_icons, #edit_inst_entry, #sidebar, #top-bar, #schedule_icons, #edit_inst_entry, #sidebar, #top-bar,
.messagebox_buttons a.close, a.button, button.button, .messagebox_buttons a.close, a.button, button.button,
#sidebar, .helpbar-container, .helpbar, #sidebar, .helpbar-container, .helpbar,
#skip_link_navigation, .skip_target, nav.action-menu, #skip_link_navigation, .skip_target, .action-menu,
#site-title { #site-title {
display: none !important; display: none !important;
} }
......
<template> <template>
<nav v-if="shouldCollapse" class="action-menu"> <div v-if="shouldCollapse" class="action-menu">
<button class="action-menu-icon" :title="title" aria-expanded="false"> <button class="action-menu-icon" :title="title" aria-expanded="false">
<span></span> <span></span>
<span></span> <span></span>
...@@ -30,12 +30,12 @@ ...@@ -30,12 +30,12 @@
</li> </li>
</ul> </ul>
</div> </div>
</nav> </div>
<nav v-else> <div v-else>
<a v-for="item in navigationItems" :key="item.id" v-bind="linkAttributes(item)" v-on="linkEvents(item)"> <a v-for="item in navigationItems" :key="item.id" v-bind="linkAttributes(item)" v-on="linkEvents(item)">
<studip-icon :title="item.label" :shape="item.icon.shape" :role="item.icon.role" :size="20"></studip-icon> <studip-icon :title="item.label" :shape="item.icon.shape" :role="item.icon.role" :size="20"></studip-icon>
</a> </a>
</nav> </div>
</template> </template>
<script> <script>
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
*/ */
?> ?>
<? // class "action-menu" will be set from API ?> <? // class "action-menu" will be set from API ?>
<nav <?= arrayToHtmlAttributes($attributes) ?> aria-role="presentation"> <div <?= arrayToHtmlAttributes($attributes) ?>>
<button class="action-menu-icon" aria-role="button" aria-expanded="false" title="<?= htmlReady($action_menu_title) ?>"> <button class="action-menu-icon" aria-expanded="false" title="<?= htmlReady($action_menu_title) ?>">
<span></span> <span></span>
<span></span> <span></span>
<span></span> <span></span>
...@@ -53,4 +53,4 @@ ...@@ -53,4 +53,4 @@
<? endforeach ?> <? endforeach ?>
</ul> </ul>
</div> </div>
</nav> </div>
<? // class "action-menu" will be set from API ?> <? // class "action-menu" will be set from API ?>
<nav <?= arrayToHtmlAttributes($attributes) ?> aria-role="presentation"> <nav <?= arrayToHtmlAttributes($attributes) ?>>
<a class="action-menu-icon" title="<?= htmlReady($label) ?>" <a class="action-menu-icon" title="<?= htmlReady($label) ?>"
aria-expanded="false" aria-label="<?= htmlReady($aria_label) ?>" aria-role="button" href="#" aria-expanded="false" aria-label="<?= htmlReady($aria_label) ?>" role="button" href="#"
<?= $image_link_attributes ? arrayToHtmlAttributes($image_link_attributes) : '' ?>> <?= $image_link_attributes ? arrayToHtmlAttributes($image_link_attributes) : '' ?>>
<?= $image ?> <?= $image ?>
</a> </a>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment