Skip to content
Snippets Groups Projects
Commit 05f1863e authored by Moritz Strohm's avatar Moritz Strohm
Browse files

fix for accessibility issues in TIC #608

Merge request studip/studip!622
parent 7ec7134a
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@
<? if ($structure['actions']): ?>
<th class="actions">
<?= ActionMenu::get()
->setContext($th_title)
->condition($mail_status)
->addLink(
$controller->url_for('messages/write?filter=inst_status', [
......
<template>
<nav v-if="shouldCollapse" class="action-menu">
<button class="action-menu-icon" :title="$gettext('Aktionsmenü')" aria-expanded="false" :aria-label="$gettext('Aktionsmenü')">
<button class="action-menu-icon" :title="title" aria-expanded="false">
<span></span>
<span></span>
<span></span>
......@@ -35,6 +35,10 @@ export default {
items: Array,
collapseAt: {
default: true,
},
context: {
type: String,
default: ''
}
},
data () {
......@@ -103,6 +107,9 @@ export default {
return true;
}
return Number.parseInt(this.collapseAt) <= this.items.length;
},
title () {
return this.context ? this.$gettextInterpolate(this.$gettext('Aktionsmenü für %{context}'), {context: this.context}) : this.$gettext('Aktionsmenü');
}
}
}
......
<template>
<div v-if="canEdit" class="cw-container-actions">
<studip-action-menu
<studip-action-menu
:items="menuItems"
:context="container.attributes.title"
@editContainer="editContainer"
@deleteContainer="deleteContainer"
@sortBlocks="sortBlocks"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment