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 @@
STUDIP.ActionMenu.closeAll();
} else if (event.key === 'Tab') {
//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)) {
event.preventDefault();
}
......
......@@ -42,7 +42,7 @@ body, input, textarea, td, th, blockquote, p, form, ul, h4 {
#schedule_icons, #edit_inst_entry, #sidebar, #top-bar,
.messagebox_buttons a.close, a.button, button.button,
#sidebar, .helpbar-container, .helpbar,
#skip_link_navigation, .skip_target, nav.action-menu,
#skip_link_navigation, .skip_target, .action-menu,
#site-title {
display: none !important;
}
......
<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">
<span></span>
<span></span>
......@@ -30,12 +30,12 @@
</li>
</ul>
</div>
</nav>
<nav v-else>
</div>
<div v-else>
<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>
</a>
</nav>
</div>
</template>
<script>
......
......@@ -12,8 +12,8 @@
*/
?>
<? // class "action-menu" will be set from API ?>
<nav <?= arrayToHtmlAttributes($attributes) ?> aria-role="presentation">
<button class="action-menu-icon" aria-role="button" aria-expanded="false" title="<?= htmlReady($action_menu_title) ?>">
<div <?= arrayToHtmlAttributes($attributes) ?>>
<button class="action-menu-icon" aria-expanded="false" title="<?= htmlReady($action_menu_title) ?>">
<span></span>
<span></span>
<span></span>
......@@ -53,4 +53,4 @@
<? endforeach ?>
</ul>
</div>
</nav>
</div>
<? // 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) ?>"
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 ?>
</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