diff --git a/public/js/components/Stv/Studentenverwaltung/Verband.js b/public/js/components/Stv/Studentenverwaltung/Verband.js
index 8ad3bebdb..065c1dc1b 100644
--- a/public/js/components/Stv/Studentenverwaltung/Verband.js
+++ b/public/js/components/Stv/Studentenverwaltung/Verband.js
@@ -149,7 +149,24 @@ export default {
}
CoreRESTClient.post("components/stv/favorites/set", {favorites: JSON.stringify(this.favorites)});
- // TODO(chris): make clickable with keyboard
+ },
+ unsetFavFocus(e) {
+ // NOTE(chris): treetable only
+ if (e.target.dataset?.linkFavAdd !== undefined) {
+ e.target.tabIndex = -1;
+ } else {
+ let items = e.target.querySelectorAll('[data-link-fav-add]:not([tabindex="-1"])');
+ items.forEach(el => el.tabIndex = document.activeElement == el ? 0 : -1);
+ }
+ },
+ setFavFocus(e) {
+ // NOTE(chris): treetable only
+ if (e.target.dataset?.linkFavAdd !== undefined) {
+ e.target.tabIndex = 0;
+ } else {
+ let items = e.target.querySelectorAll('[data-link-fav-add][tabindex="-1"]');
+ items.forEach(el => el.tabIndex = 0);
+ }
}
},
mounted() {
@@ -171,7 +188,6 @@ export default {
.then(result => {
if (result) {
let f = JSON.parse(result);
- console.log(f);
if (f.on) {
this.loading = true;
this.favorites = f;
@@ -217,6 +233,8 @@ export default {
@node-select="onSelectTreeNode"
scrollable
scroll-height="flex"
+ @focusin="setFavFocus"
+ @focusout="unsetFavFocus"
>
@@ -227,10 +245,18 @@ export default {
-
+
-
-
+
+
+
+