1document.addEventListener("DOMContentLoaded", function () { 2 3 if (!Ariaat_Data) return; 4 //console.log(Ariaat_Data) 5 // Existing ARIA logic 6 Ariaat_Data.aria.forEach(function (item) { 7 try { 8 const elements = document.querySelectorAll(item.selector); 9 elements.forEach(el => { 10 if (!el.hasAttribute(item.attribute)) { 11 el.setAttribute(item.attribute, item.value); 12 } 13 }); 14 } catch (e) { 15 console.warn("Invalid selector for aria attribute:", item.selector); 16 } 17 }); 18 19 // Existing role logic 20 Ariaat_Data.roles.forEach(function (item) { 21 try { 22 const elements = document.querySelectorAll(item.selector); 23 elements.forEach(el => { 24 if (!el.hasAttribute("role")) { 25 el.setAttribute("role", item.role); 26 } 27 }); 28 } catch (e) { 29 console.warn("Invalid selector for role:", item.selector); 30 } 31 }); 32 33 // New skip link target logic 34 if (Ariaat_Data.skip_link) { 35 try { 36 const el = document.querySelector(Ariaat_Data.skip_link); 37 38 if (el) { 39 const isId = Ariaat_Data.skip_link.startsWith('#'); 40 41 // If it's not an ID selector and element doesn't already have an ID, assign one 42 if (!isId && !el.id) { 43 el.id = 'ariaat-main-content'; 44 } 45 } 46 } catch (e) { 47 console.warn("Invalid skip link selector:", Ariaat_Data.skip_link); 48 } 49 } 50 51 // Fix positive tabindex values (tab order accessibility) 52 if (Ariaat_Data.fix_tabindex) { 53 try { 54 const all = document.querySelectorAll('[tabindex]'); 55 all.forEach(el => { 56 const value = parseInt(el.getAttribute('tabindex'), 10); 57 if (value > 0) { 58 el.setAttribute('tabindex', '0'); 59 el.setAttribute('data-ariaat-fixed', 'tabindex'); 60 } 61 }); 62 } catch (e) { 63 console.warn('ARIAAT: Error fixing tabindex values:', e); 64 } 65 } 66 67 68});
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.