PageSourceSearch

https://toba.org/wp-content/plugins/wp-accessibility/js/wp-accessibility.min.js?ver=2.4.1

js toba.org collected 2026-10-02 07:52:46 UTC 18,395 bytes, 1 lines download raw bytes

1(()=>{(()=>{"use strict";let m=document.querySelector("html"),A=document.querySelector("body"),h=[];if(wpa.lang&&(m.getAttribute("lang")||(m.setAttribute("lang",wpa.lang),(wpa.errors||wpa.tracking)&&(h.push("html-lang"),console.log("HTML language set by WP Accessibility")))),wpa.dir&&!m.getAttribute("dir")&&wpa.dir!=="ltr"&&(m.setAttributeattr("dir",wpa.dir),(wpa.errors||wpa.tracking)&&(h.push("html-lang-direction"),console.log("HTML language direction set by WP Accessibility"))),wpa.continue){let o=document.querySelectorAll(".wp-block-post-excerpt__more-link");o.length!==0&&o.forEach(i=>{if(!i.hasAttribute("aria-describedby")){let c=i.closest(".wp-block-post"),d=c.getAttribute("class");d=d.replaceAll(" ","-");let r=c.querySelector(".wp-block-post-title");r&&(r.hasAttribute("id")?d=r.getAttribute("id"):r.setAttribute("id",d),i.setAttribute("aria-describedby",d),(wpa.errors||wpa.tracking)&&console.log("Continue Reading link description set by WP Accessibility"))}})}let y=document.querySelector('meta[name="viewport"]');if(y&&wpa.viewport){let o=y.getAttribute("content"),i=y.getAttribute("content");o.search(/user-scalable=no/g)&&(i=o.replace("user-scalable=no","user-scalable=yes"),y.setAttribute("content",i),(wpa.errors||wpa.tracking)&&i!=o&&(h.push("viewport-scalable"),console.log("Viewport made scalable by WP Accessibility"))),o.search(/maximum-scale=1/g)&&(i=o.replace("maximum-scale=1","maximum-scale=5"),i=i.replace("maximum-scale=0","maximum-scale=5"),y.setAttribute("content",i),(wpa.errors||wpa.tracking)&&i!=o&&(h.push("viewport-maxscale"),console.log("Viewport maximum scale set by WP Accessibility")))}if(wpa.skiplinks.enabled&&(A.insertAdjacentHTML("afterbegin",wpa.skiplinks.output),(wpa.errors||wpa.tracking)&&(h.push("skiplinks"),console.log("Skip links added by WP Accessibility"))),wpa.current){let o=document.querySelectorAll(".current-menu-item a, .current_page_item a");o.length!==0&&(o.forEach(i=>{i.setAttribute("aria-current","page")}),(wpa.errors||wpa.tracking)&&(h.push("aria-current"),console.log("ARIA current added by WP Accessibility")))}if(wpa.labels&&["s","author","email","url","comment"].forEach(i=>{let c,d,r,a,e,l,f,t,n,s;i=="comment"?c=document.querySelectorAll("textarea[name="+i+"]"):c=document.querySelectorAll("input[name="+i+"]:not(#adminbar-search)"),c.length!==0&&c.forEach(b=>{b.length!==0&&(d=b.getAttribute("id"),r=b.closest("label"),a=b.getAttribute("aria-label"),e=b.getAttribute("aria-labelledby"),l={},e&&(l=document.getElementById(e)),f=!(a==null||a==""||typeof a>"u"),t=!(e==null||e==""||typeof e>"u"),(!f&&!t||!f&&t&&!l)&&(d?(n=document.querySelector("label[for="+d+"]"),n&&(s=n.innerText,n&&!s&&(n.innerText=wpa.wpalabels[i],(wpa.errors||wpa.tracking)&&(h.push(["empty-label",wpa.wpalabels[i]]),console.log("Empty label on "+wpa.wpalabels[i]+" added by WP Accessibility")))),!n&&!r&&(b.insertAdjacentHTML("beforebegin","<label for='"+d+"' class='wpa-screen-reader-text'>"+wpa.wpalabels[i]+"</label>"),(wpa.errors||wpa.tracking)&&(h.push(["explicit-label",wpa.wpalabels[i]]),console.log("Explicit label on "+wpa.wpalabels[i]+" added by WP Accessibility")))):r||(b.setAttribute("id","wpa_label_"+i),b.insertAdjacentHTML("beforebegin","<label for='wpa_label_"+i+"' class='wpa-screen-reader-text'>"+wpa.wpalabels[i]+"</label>"),(wpa.errors||wpa.tracking)&&(h.push(["implicit-label",wpa.wpalabels[i]]),console.log("Implicit label on "+wpa.wpalabels[i]+" added by WP Accessibility")))))})}),wpa.titles){let o=0,i=0,c=0,d=!1,r=document.querySelectorAll("img, a, input, textarea, select, button");r.length!==0&&(r.forEach(a=>{let e=a.getAttribute("title");if(a.classList.contains("nturl")&&(d=!0),e&&e!=="")switch(a.tagName){case"IMG":let l=a.getAttribute("alt");e=a.getAttribute("title"),!l||l===""?(a.setAttribute("alt",e),a.removeAttribute("title")):e===l&&a.removeAttribute("title"),o++;break;case"A":case"BUTTON":let f=E(a);if(!f||f===""){let L=a.getAttribute("aria-label");(!L||L==="")&&(a.setAttribute("aria-label",e),d||a.removeAttribute("title"))}else a.removeAttribute("title");i++;break;case"INPUT":case"SELECT":case"TEXTAREA":let t=a.getAttribute("aria-label"),n=a.getAttribute("aria-labelledby"),s=n?document.getElementById(n):!1,b=a.getAttribute("id"),g=b?document.querySelector('label[for="'+b+'"]'):!1,w=a.closest("label"),u=!!(t&&t!==""),p=!!(g&&E(g)!==""),x=!!(w&&E(w)!==""),k=!!(s&&E(s)!=="");u||p||x||k||a.setAttribute("aria-label",e),a.removeAttribute("title"),c++;break}}),(wpa.errors||wpa.tracking)&&(o>0&&(h.push(["images-titles",o]),console.log(o+" title attributes removed from images by WP Accessibility")),i>0&&(h.push(["control-titles",i]),console.log(i+" title attributes removed from links and buttons by WP Accessibility")),c>0&&(h.push(["input-titles",c]),console.log(c+" title attributes removed from input fields by WP Accessibility"))))}if(wpa.target){let o=document.querySelectorAll("a:not(.wpa-allow-target)"),i=0;
1o.length!==0&&(o.forEach(c=>{let d=c.getAttribute("target"),r=c.getAttribute("href");if(d)if(r.startsWith("#"))c.removeAttribute("target");else try{new URL(r).hostname.includes("facebook")||(c.removeAttribute("target"),i++)}catch{console.log("href value is not a URL or a fragment:",r)}}),i>0&&(wpa.errors||wpa.tracking)&&(h.push(["link-targets",i]),console.log(i+" target attributes removed from links by WP Accessibility")))}if(wpa.tabindex){let o=document.querySelectorAll("input:not(.wpa-ignore-tabindex),a[href]:not(.wpa-ignore-tabindex),select:not(.wpa-ignore-tabindex),textarea:not(.wpa-ignore-tabindex),button:not(.wpa-ignore-tabindex)"),i=0;o.length!==0&&(o.forEach(e=>{let l=e.getAttribute("tabindex"),f=!1;if(e.hasAttribute("tabindex")&&l==="-1"){let t=e.getAttribute("aria-hidden"),n=e.hasAttribute("hidden");(t==="true"||n)&&(f=!0)}l&&!f&&(e.removeAttribute("tabindex"),i++)}),i>0&&(wpa.errors||wpa.tracking)&&(h.push(["control-tabindex",i]),console.log(i+" tabindex attributes removed from links, buttons and inputs by WP Accessibility")));let c=document.querySelectorAll('[role="button"]:not([tabindex]):not(a):not(button)'),d=document.querySelectorAll('a[role="button"]:not([tabindex]):not([href])'),r=document.querySelectorAll('[role="link"]:not([tabindex]):not(a)'),a=document.querySelectorAll("a:not([href]):not([tabindex])");c.length!==0&&(c.forEach(e=>{e.setAttribute("tabindex","0"),e.classList.add("wpa-focusable")}),c.length>0&&(wpa.errors||wpa.tracking)&&(h.push(["button-add-tabindex",c.length]),console.log(c.length+" tabindex attributes added to divs with the button role by WP Accessibility"))),d.length!==0&&(d.forEach(e=>{e.setAttribute("tabindex","0"),e.classList.add("wpa-focusable")}),d.length>0&&(wpa.errors||wpa.tracking)&&(h.push(["link-add-tabindex",d.length]),console.log(d.length+" tabindex attributes added to anchor elements with the button role and no href value by WP Accessibility"))),r.length!==0&&(r.forEach(e=>{e.setAttribute("tabindex","0"),e.classList.add("wpa-focusable")}),r.length>0&&(wpa.errors||wpa.tracking)&&(h.push(["fakelink-add-tabindex",r.length]),console.log(r.length+" tabindex attributes added to elements with the link role not using the a element by WP Accessibility"))),a.length!==0&&(a.forEach(e=>{e.setAttribute("tabindex","0"),e.classList.add("wpa-focusable")}),a.length>0&&(wpa.errors||wpa.tracking)&&(h.push(["links-add-tabindex",a.length]),console.log(a.length+" tabindex attributes added to a with no href attribute by WP Accessibility")))}if(wpa.url!=="disabled"){let c=function(e,l,f="event"){e=JSON.stringify(e);let t=new FormData;t.append("action",wpa.action),t.append("security",wpa.security),t.append("stats",e),t.append("post_id",wpa.post_id),t.append("title",l),t.append("type",f),fetch(wpa.ajaxurl,{method:"POST",body:t})};class o{constructor(l){var f=Array.prototype.forEach,t=Array.prototype.map;this.each=function(n,s,b){if(n!=null){if(f&&n.forEach===f)n.forEach(s,b);else if(n.length===+n.length){for(var g=0,w=n.length;g<w;g++)if(JSON.stringify(s.call(b,n[g],g,n))==="{}")return}else for(var u in n)if(n.hasOwnProperty(u)&&JSON.stringify(s.call(b,n[u],u,n))==="{}")return}},this.map=function(n,s,b){var g=[];return n==null?g:t&&n.map===t?n.map(s,b):(this.each(n,function(w,u,p){g[g.length]=s.call(b,w,u,p)}),g)},l&&(this.hasher=l)}get(){let l=[];l.push(navigator.userAgent),l.push([screen.height,screen.width,screen.colorDepth].join("x")),l.push(new Date().getTimezoneOffset()),l.push(!!window.sessionStorage),l.push(!!window.localStorage);var f=this.map(navigator.plugins,function(t){var n=this.map(t,function(s){return[s.type,s.suffixes].join("~")}).join(",");return[t.name,t.description,n].join("::")},this).join(";");return l.push(f),this.hasher?this.hasher(l.join("###"),31):this.murmurhash3_32_gc(l.join("###"),31)}murmurhash3_32_gc(l,f){let t,n,s,b,g,w,u,p;for(t=l.length&3,n=l.length-t,s=f,g=3432918353,w=461845907,p=0;p<n;)u=l.charCodeAt(p)&255|(l.charCodeAt(++p)&255)<<8|(l.charCodeAt(++p)&255)<<16|(l.charCodeAt(++p)&255)<<24,++p,u=(u&65535)*g+(((u>>>16)*g&65535)<<16)&4294967295,u=u<<15|u>>>17,u=(u&65535)*w+(((u>>>16)*w&65535)<<16)&4294967295,s^=u,s=s<<13|s>>>19,b=(s&65535)*5+(((s>>>16)*5&65535)<<16)&4294967295,s=(b&65535)+27492+(((b>>>16)+58964&65535)<<16);switch(u=0,t){case 3:u^=(l.charCodeAt(p+2)&255)<<16;case 2:u^=(l.charCodeAt(p+1)&255)<<8;case 1:u^=l.charCodeAt(p)&255,u=(u&65535)*g+(((u>>>16)*g&65535)<<16)&4294967295,u=u<<15|u>>>17,u=(u&65535)*w+(((u>>>16)*w&65535)<<16)&4294967295,s^=u}return s^=l.length,s^=s>>>16,s=(s&65535)*2246822507+(((s>>>16)*2246822507&65535)<<16)&4294967295,s^=s>>>13,s=(s&65535)*3266489909+(((s>>>16)*3266489909&65535)<<16)&4294967295,s^=s>>>16,s>>>0}}let i=new o().get(),d=document.querySelector(".toggle-contrast");d&&d.addEventListener("click",function(){let e;this.getAttribute("data-id")=="is_normal_contrast"?e={contrast:"disabled"}:e={contrast:"enabled"},c(e,i)});let r=document.querySelector(".toggle-fontsize");r&&r.addEventListener("click",function(){let e;this.getAttribute("data-id")=="is_normal_fontsize"?e={fontsize:"disabled"}:e={fontsize:"enabled"},c(e,i)}),v(".wpa-ld button").then(e=>{e.addEventListener("click",function(l){if(e.getAttribute("aria-expanded")==="true"){let s={longdesc:e.closest("div").getAttribute("class").replace("wpa-ld wp-image-","")};c(s,i)}})});let a=document.querySelectorAll(".wpa-alt button");a.length>
10&&a.forEach(e=>{e.addEventListener("click",function(l){if(e.getAttribute("aria-expanded")==="true"){let s={alttext:e.closest("div").getAttribute("class").replace("wpa-alt wp-image-","")};c(s,i)}})}),wpa.tracking&&h.length>=1&&c(h,wpa.url,"view")}if(wpa.underline.enabled){let o=document.querySelectorAll(wpa.underline.target+":not(nav "+wpa.underline.target+"):not(#wpadminbar a), .wpa-focusable[role=link]");o.length>0&&o.forEach(i=>{let c=i.style.outlineWidth,d=i.style.outlineOffset,r=i.style.color,a=i.style.outlineColor;i.style.textDecoration="underline",i.addEventListener("mouseenter",function(){this.style.textDecoration="none"}),i.addEventListener("mouseleave",function(){this.style.textDecoration="underline"}),i.addEventListener("focusin",function(){let e="2px";c=="2px"&&(e="4px"),this.style.outlineWidth=e,this.style.outlineColor=r,this.style.outlineOffset="2px"}),i.addEventListener("focusout",function(){this.style.outlineWidth=c,this.style.outlineColor=a,this.style.outlineOffset=d})})}if(wpa.videos){let o=matchMedia("(prefers-reduced-motion)"),i="false",c=document.querySelectorAll("video[autoplay]:not([controls])");c.length>0&&c.forEach(d=>{o.matches&&(d.pause(),i="true");let r=d.parentElement,a=document.createElement("button"),e=document.createElement("span"),l=document.createElement("span");a.setAttribute("type","button"),a.classList.add("wpa-video"),a.setAttribute("aria-pressed",i),e.classList.add("dashicons-controls-pause","dashicons"),e.setAttribute("aria-hidden","true"),l.classList.add("screen-reader-text"),l.innerText=wpa.pause,a.append(e,l),r.append(a),a.addEventListener("click",function(){let f=this.getAttribute("aria-pressed");console.log(f),f==="true"?(d.play(),this.setAttribute("aria-pressed","false")):(d.pause(),this.setAttribute("aria-pressed","true"))})})}if(wpa.alt){let o=wpa.altSelector?wpa.altSelector:'.hentry img[alt]:not([alt=""]), .comment-content img[alt]:not([alt=""]), #content img[alt]:not([alt=""]),.entry-content img[alt]:not([alt=""])',i=document.querySelectorAll(o),c=(d,r)=>{d.parentElement.insertBefore(r,d),r.appendChild(d)};i.forEach(d=>{let r=d,a=r.closest("a"),e=r.closest("button"),l=!!a,f=!!e,t=r.width,n=r.height;if((t||n)&&(t=t||56,n=n||56,n*t<150*300||d.classList.contains("wpa-skip")||d.closest(".wpa-skip")))return;let s=r.getAttribute("alt"),b=[...r.classList];r.setAttribute("class","");let g=document.createElement("div");g.classList.add("wpa-alt"),c(l||f?l?a:e:r,g),b.forEach(p=>{g.classList.add(p)}),g.insertAdjacentHTML("afterbegin",'<button aria-expanded="false" type="button" class="wpa-toggle">alt</button>'),g.insertAdjacentHTML("beforeend",'<div class="wpa-alt-text"></div>');let w=g.querySelector(".wpa-alt-text");w.style.display="none",w.innerText=s,g.querySelector("button").addEventListener("click",function(p){w.checkVisibility()?(this.setAttribute("aria-expanded","false"),w.style.display="none"):(this.setAttribute("aria-expanded","true"),w.style.display="block")})})}if(wpa.ldType){let c=function(r){let a=r.getAttribute("class"),e=r.getAttribute("id"),l;e&&e.includes("longdesc")?l=e.replace("longdesc-return-",""):((a===null||a==="")&&(parent=r.closest(".wpa-alt"),a=parent.getAttribute("class").replace("wpa-alt ","")),l=a.replace("wp-image-",""));let f=wpa.restUrl+"/"+l;fetch(f).then(t=>t.json()).then(t=>{let n=t.description.rendered;if(n=n.replace(/(<([^>]+)>)/gi,"").trim(),n!==""){let s=new URL(wpa.ldHome);s.searchParams.set("longdesc",l),s.searchParams.set("p",l),s.toString(),d(r,l,s,n)}}).catch(t=>{console.log(t)})},d=function(r,a,e,l){let f=document.createElement("div");f.classList.add("wpa-ld");let t=r.getAttribute("alt");t===""&&(t="<code>"+r.getAttribute("src").replace(wpa.ldHome,"")+"</code>");let n=document.body.className.split(/\s+/),s="";n.forEach(p=>{p.match(/postid-/gi)&&(s=p.replace("postid-","",p)),p.match(/page-id-/gi)&&(s=p.replace("page-id-","",p))});let b=new URL(e);b.searchParams.set("referrer",s),b.toString(),[...r.classList].forEach(p=>{f.classList.add(p)}),o(r,f),r.setAttribute("alt",""),r.setAttribute("class","");let w=document.createElement("a");w.setAttribute("href",b),w.classList.add("longdesc-link");let u=document.createElement("span");if(u.classList.add("screen-reader-text"),u.textContent=" of "+t,w.textContent="Description",w.appendChild(u),wpa.ldType==="link")f.insertAdjacentElement("beforeend",w);else{f.insertAdjacentHTML("beforeend",'<button aria-expanded="false" class="wpa-toggle">'+wpa.ldText+"</button>"),f.insertAdjacentHTML("beforeend",'<div class="longdesc"></div>');let p=f.querySelector(".longdesc");p.style.display="none",fetch(e).then(x=>
1{if(x.ok)return x.text();p.insertAdjacentHTML("beforeend",l)}).then(x=>{let L=new DOMParser().parseFromString(x,"text/html");p.insertAdjacentElement("beforeend",L.querySelector("#desc_"+a))}),f.querySelector("button").addEventListener("click",function(x){p.checkVisibility()?(this.setAttribute("aria-expanded","false"),p.style.display="none"):(this.setAttribute("aria-expanded","true"),p.style.display="block")})}},o=(r,a)=>{r.parentElement.insertBefore(a,r),a.appendChild(r)},i=document.querySelectorAll("img[longdesc]");if(wpa.ldType==="link"){i.length>0&&i.forEach(a=>{let e=document.createElement("div");e.classList.add("wpa-ld");let l=a.getAttribute("longdesc"),f=a.getAttribute("alt"),t=[...a.classList];o(a,e),t.forEach(b=>{e.classList.add(b)}),a.setAttribute("class","");let n=document.createElement("a");n.setAttribute("href",l),n.classList.add("longdesc-link");let s=document.createElement("span");s.classList.add("screen-reader-text"),s.textContent=" of "+f,n.textContent="Description",n.appendChild(s),a.insertAdjacentElement("afterend",n)});let r=document.querySelectorAll("figure.is-style-longdesc");r.length>0&&r.forEach(a=>{let e=a.querySelector("img");c(e)})}else{i.length>0&&i.forEach(a=>{c(a)});let r=document.querySelectorAll("figure.is-style-longdesc");r.length>0&&r.forEach(a=>{let e=a.querySelector("img");c(e)})}}document.addEventListener("wpa_fontsize_changed",function(o){S(o.detail.change,o.detail.factor)});function S(o="increase",i=1.6){let c=document.getElementById("wpadminbar"),d=document.querySelector(".a11y-toolbar"),r=t=>{for(;t;){if(t.hasAttribute("data-wpa-resized"))return!0;t=t.parentElement}return!1},a=t=>{let s=window.getComputedStyle(t).getPropertyValue("font-size").replace("px",""),b="font-size: "+parseFloat(s)*i+"px !important";if(!r(t)&&o==="increase"){let g=t.style.fontSize;g?t.setAttribute("data-wpa-resized",g):t.setAttribute("data-wpa-resized","true"),t.style.cssText+=b}o==="reset"&&(t.style.removeProperty("font-size"),t.hasAttribute("data-wpa-resized")&&t.getAttribute("data-wpa-resized")!=="true"&&(t.style.fontSize=t.getAttribute("data-wpa-resized")),t.removeAttribute("data-wpa-resized"))},e=document.createTreeWalker(document.body,NodeFilter.SHOW_TEXT,{acceptNode:function(t){let n=t.parentElement?t.parentElement.tagName:"";return["SCRIPT","STYLE","NOSCRIPT","SVG"].includes(n)||c&&c.contains(t)||d&&d.contains(t)?NodeFilter.FILTER_REJECT:t.textContent.trim().length>0||t.nodeType===Node.ELEMENT_NODE?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}),l=new Set;for(;e.nextNode();){let n=e.currentNode.parentElement;n&&!l.has(n)&&(l.add(n),a(n))}document.body.querySelectorAll("input, select, textarea").forEach(t=>{c&&c.contains(t)||d&&d.contains(t)||l.has(t)||(l.add(t),a(t))})}})();function E(m){let A="";if(m.nodeType===3||m.nodeType===4)A=m.nodeValue;else if(m.nodeType===1&&(m.tagName.toLowerCase()=="img"||m.tagName.toLowerCase()=="area"||m.tagName.toLowerCase()=="input"&&m.getAttribute("type")&&m.getAttribute("type").toLowerCase()=="image"))A=m.getAttribute("alt")||"";else if(m.nodeType===1&&!m.tagName.match(/^(script|style)$/i)){let h=m.childNodes;for(let y=0,S=h.length;y<S;y++){let o=m.getAttribute("aria-label");A+=o||E(h[y])+" "}}return A}function v(m){return new Promise(A=>{if(document.querySelector(m))return A(document.querySelector(m));let h=new MutationObserver(y=>{document.querySelector(m)&&(h.disconnect(),A(document.querySelector(m)))});h.observe(document.body,{childList:!0,subtree:!0})})}})();

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.