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 @@ ...@@ -7,6 +7,7 @@
<? if ($structure['actions']): ?> <? if ($structure['actions']): ?>
<th class="actions"> <th class="actions">
<?= ActionMenu::get() <?= ActionMenu::get()
->setContext($th_title)
->condition($mail_status) ->condition($mail_status)
->addLink( ->addLink(
$controller->url_for('messages/write?filter=inst_status', [ $controller->url_for('messages/write?filter=inst_status', [
......
<template> <template>
<nav v-if="shouldCollapse" class="action-menu"> <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> <span></span>
<span></span> <span></span>
...@@ -35,6 +35,10 @@ export default { ...@@ -35,6 +35,10 @@ export default {
items: Array, items: Array,
collapseAt: { collapseAt: {
default: true, default: true,
},
context: {
type: String,
default: ''
} }
}, },
data () { data () {
...@@ -103,6 +107,9 @@ export default { ...@@ -103,6 +107,9 @@ export default {
return true; return true;
} }
return Number.parseInt(this.collapseAt) <= this.items.length; 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> <template>
<div v-if="canEdit" class="cw-container-actions"> <div v-if="canEdit" class="cw-container-actions">
<studip-action-menu <studip-action-menu
:items="menuItems" :items="menuItems"
:context="container.attributes.title"
@editContainer="editContainer" @editContainer="editContainer"
@deleteContainer="deleteContainer" @deleteContainer="deleteContainer"
@sortBlocks="sortBlocks" @sortBlocks="sortBlocks"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment