1$(document).ready(function() { 2 var nav_button = $('.btn.btn-navbar'); 3 var target = $('html'); 4 5 nav_button.click(function(event) { 6 target.toggleClass('has-active-navbar-burger'); 7 nav_button.blur(); 8 burgerMenuFocusable(); 9 }); 10 11 $('#dsmenus').find('a').attr('tabindex', '-1'); 12 13 addFocus_Search(); 14 15 16 // Nur der aktive Slider sollte erstmal navigierbar sein 17 $('.swiper-slide.swiper-slide-active a.btn').attr('tabindex', '0'); 18}); 19 20 21 22function addFocus_Search(){ 23 $('.suche a').on('focus', function() { 24 // Fokus an das <i>-Element innerhalb des aktuellen Elements übergeben 25 $(this).parent().focus(); 26 }); 27} 28 29 30function burgerMenuFocusable() { 31 // Navbar Fokus-toggling über tabindex 32 const $navbar_btn = $('.btn.btn-navbar'); 33 const $menus = $('#nav-collapse'); 34 const $hasIn = $menus.hasClass('in'); // Prüfen, ob Menü geöffnet ist 35 36 const $menuLinks = $('#dsmenus').find('a'); 37 const $otherLinks = $('a').not($menuLinks); 38 39 if ($navbar_btn.hasClass('collapsed')){
40 $navbar_btn.attr('aria-expanded', 'true'); 41 } else { 42 $navbar_btn.attr('aria-expanded', 'false'); 43 } 44 45 // Tabindex für Links anpassen, abhängig von Menüzustand 46 if ($hasIn) { 47 $menuLinks.attr('tabindex', '-1'); // Fokussierbar machen 48 $otherLinks.attr('tabindex', '0'); // Fokussierung verhindern 49 } else { 50 $menuLinks.attr('tabindex', '0'); // Fokussierung verhindern 51 $otherLinks.attr('tabindex', '-1'); // Fokussierbar machen 52 } 53}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.