1var accessibility = { 2 3 init: function() { 4 window.galleries.accessibility.top_nav(); 5 6 // Wrapped in document ready to ensure it is called last 7 // We know this is weird because its already nested in another $(document).ready and should be improved in the future if possible 8 $(document).ready(function() { 9 h.accessibility.role_button(); 10 11 // Some screen readers read out Horizontal rules, so we add aria-hidden to them 12 // This is a temporary fix until we update tinymce to allow html attriubtes to be added or to always add the aria-hidden 13 // attribute if a horizontal rule is added with tinymce 14 $('hr').attr('aria-hidden', 'true'); 15 }); 16 }, 17 18 top_nav: function() { 19 20 // Add dialog role to the top nav when it turns into an overlay. 21 var responsive_top_size = $('#header #responsive_slide_nav_wrapper_inner').attr('data-responsive-top-size'); 22 if (responsive_top_size == 'responsive_nav_always_enabled') { 23 $('#header #responsive_slide_nav_wrapper_inner').attr({ 24 role: "dialog", 25 'aria-label': "Main navigation",
26 'aria-modal': true 27 }); 28 } else { 29 $(window).resize(function(){ 30 if ($(window).width() < parseInt(responsive_top_size)) { 31 $('#header #responsive_slide_nav_wrapper_inner').attr({ 32 role: "dialog", 33 'aria-label': "Main navigation", 34 'aria-modal': true 35 }); 36 } else { 37 $('#header #responsive_slide_nav_wrapper_inner').removeAttr('role aria-label'); 38 } 39 }); 40 } 41 42 } 43 44} 45 46window.galleries = window.galleries || {}; 47window.galleries.accessibility = accessibility; 48export default accessibility;
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.