PageSourceSearch

https://tickaroo.com/hubfs/hub_generated/template_assets/1/2734267…/template_accessibility.min.js

js tickaroo.com collected 2026-09-24 09:25:24 UTC 8,329 bytes, 2 lines download raw bytes

1!function(){"use strict";let e=[];function t(e){const t=[],a=e.querySelectorAll("p, a, h1, h2, h3, h4, h5, h6, span, li, button");return Array.from(a).forEach(e=>{if(""===e.innerText.trim())return;const a=window.getComputedStyle(e);if("none"===a.display||"hidden"===a.visibility)return;const s=a.color,r=function(e){let t=e;for(;t;){const e=window.getComputedStyle(t).backgroundColor;if(e&&"rgba(0, 0, 0, 0)"!==e&&"transparent"!==e)return e;t=t.parentElement}return"rgb(255, 255, 255)"}(e),o=function(e,t){const n=i(e),a=i(t);return(Math.max(n,a)+.05)/(Math.min(n,a)+.05)}(n(s),n(r)),l=parseInt(a.fontSize,10),d=parseInt(a.fontWeight,10)>=700,h=l>=24||l>=18.5&&d?3:4.5;o<h&&t.push({type:"warning",message:"Potential low color contrast detected.",details:`Ratio is ~${o.toFixed(2)}:1. Required: ${h}:1. This check may be inaccurate with background images or gradients.`,element:e})}),t}function n(e){const t=e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);return t?[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]:[0,0,0]}function i(e){const[t,n,i]=e.map(e=>(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4));return.2126*t+.7152*n+.0722*i}function a(){const n=document;let i=[];i.push(...function(e){const t=[];return e.querySelectorAll(".hs-breadcrumb-menu-item.first-crumb").forEach(e=>{const n=e.querySelector(".hs-breadcrumb-label");n&&(n.setAttribute("aria-label","Home"),t.push({type:"fix",message:"AUTO-FIX: Home breadcrumb label was given an aria-label.",details:'An aria-label of "Home" was applied to the label inside the first breadcrumb item for better screen reader context.',element:e}))}),t}(n)),i.push(...function(e){const t=[];return e.querySelectorAll("a[data-hs-anchor]").forEach(e=>{e.setAttribute("aria-hidden","true"),t.push({type:"fix",message:"AUTO-FIX: Anchor link with data-hs-anchor was hidden.",details:"Anchor links used for in-page navigation scripts are often not meaningful to screen reader users and have been hidden.",element:e})}),t}(n)),i.push(...function(e){const t=[];return e.querySelectorAll("img").forEach(e=>{e.hasAttribute("alt")?""===e.getAttribute("alt").trim()&&t.push({type:"warning",message:"Image has an empty `alt` attribute.",details:"This is valid for decorative images. Please verify this image does not convey information.",element:e}):t.push({type:"error",message:"Image is missing an `alt` attribute.",details:"All `<img>` elements must have an `alt` attribute to describe image content for screen readers.",element:e})}),t}(n)),i.push(...function(e){const t=[];return e.querySelectorAll('input:not([type="hidden"]), textarea, select').forEach(n=>{const i=n.id,a=!!i&&e.querySelector(`label[for="${i}"]`),s="label"===n.parentElement.tagName.toLowerCase();a||s||t.push({type:"error",message:"Form element is missing a corresponding <label>.",details:"Inputs must be associated with a label for screen reader users.",element:n})}),t}(n)),i.push(...function(e){const t=[],n=e.querySelectorAll("h1, h2, h3, h4, h5, h6");e.querySelectorAll("h1").length>1&&t.push({type:"error",message:"Multiple `<h1>` tags found.",details:"A page should ideally have only one `<h1>` for the main title.",element:e.querySelectorAll("h1")});let i=0;return n.forEach((e,a)=>{if(e.closest("footer"))return e.setAttribute("aria-hidden","true"),void t.push({type:"fix",message:"AUTO-FIX: Heading inside <footer> was hidden.",details:`The element <${e.tagName.toLowerCase()}> was hidden with aria-hidden="true" because headings in footers are often for stylistic purposes and can disrupt the document outline.`,element:e});if(e.closest(".testimonial-content"))return e.setAttribute("aria-hidden","true"),void t.push({type:"fix",message:"AUTO-FIX: Heading inside .testimonial-content was hidden.",details:`The element <${e.tagName.toLowerCase()}> was hidden with aria-hidden="true" because headings in testimonials are often stylistic.`,element:e});if(e.closest(".icon-list-item"))return e.setAttribute("aria-hidden","true"),void t.push({type:"fix",message:"AUTO-FIX: Heading inside .icon-list-item was hidden.",details:`The element <${e.tagName.toLowerCase()}> was hidden with aria-hidden="true" because headings in icon lists are often stylistic.`,element:e});if(""===e.textContent.trim())return e.setAttribute("aria-hidden","true"),void t.push({type:"fix",message:"AUTO-FIX: Empty or whitespace-only heading was hidden.",details:'Headings should not be used for spacing or without content. The element was hidden with aria-hidden="true".',element:e});const s=n[a+1];if("H6"===e.tagName&&s){const n=parseInt(s.tagName.substring(1));if(n<=4)return e.setAttribute("aria-hidden","true"),void t.push({type:"fix",message:"AUTO-FIX: <h6> followed by a higher heading was hidden.",details:`The <h6> was hidden because it was immediately followed by a higher-level heading (<h${n}>), which indicates incorrect document structure.`,element:e})}const r=parseInt(e.tagName.substring(1));r>i+1&&(e.closest(".card-with-icon")?(e.setAttribute("aria-hidden","true"),t.pu
1sh({type:"fix",message:"AUTO-FIX: Skipped heading inside .card-with-icon was hidden.",details:`The element <h${r}> was hidden with aria-hidden="true" because it skipped a level inside a card component, which is often stylistic.`,element:e})):e.classList.contains("author-name")?(e.setAttribute("aria-hidden","true"),t.push({type:"fix",message:'AUTO-FIX: Skipped heading with class "author-name" was hidden.',details:`The element <h${r}> was hidden with aria-hidden="true" because it skipped a level and matched the "author-name" class.`,element:e})):t.push({type:"warning",message:"Skipped heading level.",details:`Heading structure jumps from <h${i}> to <h${r}>. Headings should be sequential.`,element:e})),i=r}),t}(n)),i.push(...function(e){const t=[];return e.querySelectorAll("a, button").forEach(e=>{""!==e.innerText.trim()||e.querySelector("img[alt]")||e.getAttribute("aria-label")||t.push({type:"error",message:"Interactive element has no discernible text.",details:"Links and buttons must have text or an `aria-label` so screen reader users know their purpose.",element:e}),"a"!==e.tagName.toLowerCase()||e.hasAttribute("href")||t.push({type:"error",message:"Anchor tag used like a button is missing an `href` attribute.",details:"Use a `<button>` for actions or provide a valid `href` for links.",element:e})}),t}(n)),i.push(...function(e){const t=e.documentElement;return t.hasAttribute("lang")&&""!==t.getAttribute("lang").trim()?[]:[{type:"error",message:"`lang` attribute is missing or empty on the `<html>` tag.",details:"Declaring the document language is crucial for screen reader pronunciation.",element:t}]}(n)),i.push(...function(e){const t=[];return["header","nav","main","footer"].forEach(n=>{0===e.querySelectorAll(n).length&&t.push({type:"warning",message:`Consider using the <${n}> landmark element.`,details:"Semantic landmarks like `<header>`, `<nav>`, and `<main>` improve page navigation for assistive technologies.",element:e.body})}),t}(n)),i.push(...t(n)),e=i}window.EAA={report:()=>function(e){const t=e.filter(e=>"error"===e.type),n=e.filter(e=>"warning"===e.type),i=e.filter(e=>"fix"===e.type);0!==t.length||0!==n.length||0!==i.length?(console.group(`EAA Accessibility Report (${t.length} Errors, ${n.length} Warnings, ${i.length} Fixed)`),console.log("This report lists potential accessibility issues. Manual verification is required."),t.length>0&&(console.groupCollapsed(`❌ Errors (${t.length})`),t.forEach(e=>{console.error(e.message),console.log({details:e.details,element:e.element})}),console.groupEnd()),n.length>0&&(console.groupCollapsed(`⚠️ Warnings (${n.length})`),n.forEach(e=>{console.warn(e.message),console.log({details:e.details,element:e.element})}),console.groupEnd()),i.length>0&&(console.groupCollapsed(`✅ Fixed (${i.length})`),i.forEach(e=>{console.log(`%c${e.message}`,"color: #3b82f6;"),console.log({details:e.details,element:e.element})}),console.groupEnd()),console.groupEnd()):console.log("%c✅ EAA Checker: No major accessibility issues found by this automated scan.","color: #22c55e; font-size: 1.1em; font-weight: bold;")}(e)},"loading"===document.readyState?document.addEventListener("DOMContentLoaded",a):a()}();
2//# sourceURL=https://25354383.fs1.hubspotusercontent-eu1.net/hubfs/25354383/hub_generated/template_assets/1/273426758895/1786623951083/template_accessibility.js

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.