PageSourceSearch

https://app.webyes.com/assets/accessibility.lazy-4HbjQoLu.js

js webyes.com collected 2026-09-24 09:02:56 UTC 4,980 bytes, 3 lines download raw bytes

1import{u as v,a as _,aW as f,r as l,U as j,R as g,a9 as C,V as k,j as e,bZ as W,l as N,c3 as D,d as E,b5 as F,c2 as V,ah as O,c as R}from"./index-ZSD7495G.js";import{D as S}from"./DialogBox-DZPxf2_X.js";const I=D();function L(){const{websiteDetails:c,user:t}=v(),y=_(),s=f(c?.wcagVersion),[w,n]=l.useState(s),[i,o]=l.useState(null),[r,u]=l.useState(!1);l.useEffect(()=>{n(s)},[s]);const p=l.useCallback(d=>{const a=f(d);if(a===s){n(a),o(null);return}n(a),o(a)},[s]),b=l.useCallback(()=>{o(null),n(s)},[s]),m=l.useCallback(async()=>{if(!i||!c?.id||!t?.organisation_id)return;u(!0);const d=await j.updateWebsite({website_id:c.id,organisation_id:t.organisation_id,wcag_version:i});u(!1),o(null),d.success?(g("Saved!",`Results now reported against WCAG ${i}.`),await C(),await y.invalidateQueries()):(n(s),k("Failed!",d.detail??"Failed to change the WCAG version"))},[i,c?.id,t?.organisation_id,s,y]),h=e.jsxs("div",{className:"wy-p-6",children:[e.jsxs("div",{className:"wy-flex wy-justify-between",children:[e.jsx("h1",{className:"wy-text-lg wy-font-bold",children:"Change WCAG version?"}),e.jsx("button",{onClick:b,"aria-label":"Close",children:e.jsx(N,{width:"15",height:"15"})})]}),e.jsxs("p",{className:"wy-text-sm wy-my-4",children:["Your results will be reported against"," ",e.jsxs("strong",{children:["WCAG ",i]}),". Issue counts and your compliance score may change, because success criteria outside this version are no longer counted. Your site is not rescanned — existing results are simply re-classified."]}),e.jsxs("div",{className:"wy-flex wy-gap-4 wy-justify-end",children:[e.jsx("button",{className:"wy-border hover:wy-border-webyes-primary/30 wy-text-text13 wy-border-webyes-primary wy-text-webyes-primary wy-px-4 wy-py-2 wy-rounded-md",onClick:b,children:"Cancel"}),e.jsx("button",{className:"wy-bg-webyes-primary wy-text-text13 hover:wy-bg-webyes-primary/80 wy-text-white wy-px-4 wy-py-2 wy-rounded-md disabled:wy-opacity-60",onClick:m,disabled:r,children:r?"Applying…":"Apply"})]})]});return e.jsxs(e.Fragment,{children:[e.jsx(S,{isOpen:i!==null,closeBtn:!0,content:h}),e.jsxs("div",{className:"wy-flex wy-items-center wy-gap-3.5",children:[e.jsx("label",{className:"wy-text-[15px] wy-font-medium",htmlFor:"wcag-version",children:"WCAG version"}),e.jsx(W,{selectedFilter:w,setSelectedFilter:p,filterOptions:I})]})]})}const T=R("/(protected)/_layout/dashboard/_layout/settings/_settings_layout/accessibility")({component:G});function G(){const{activePlan:c}=E(),{websiteDetails:t,user:y,report:s,scanType:w}=v(),[n,i]=l.useState(t?.enableAAA??!1);l.useEffect(()=>{i(t?.enableAAA??!1)},[t?.enableAAA]);const[o,r]=l.useState(!1),u=async()=>{const a=!n&&(s?.metrics?.some(x=>x.key==="accessibility"&&x.accessibilityData?.wcag_2aaa_score===0)??!1);await m(),a&&r(!0)},{setFullScanOpen:p,setRescanOpen:b}=F(),m=async()=>{if(!t?.id||!y?.organisation_id)return;const a=!n,x={website_id:t?.id,enable_aaa:a,organisation_id:y?.organisation_id};i(a);const A=await j.updateWebsite(x);A.success?a?g("Enabled!","Enabled Level AAA checks"):g("Disabled!","Disabled Level AAA checks"):(i(!a),k("Failed!",A.detail??"Failed to enable Level AAA checks")),await C()},h=async()=>{!t?.id||!s?.auditId||(w==="quick"?p(!0):b(!0),r(!1))},d=e.jsxs("div",{className:"wy-p-6",children:[e.jsxs("div",{className:"wy-flex wy-justify-between",children:[e.jsx("h1",{className:"wy-text-lg wy-font-bold",children:"AAA Checks Activated"}),e.jsx("button",{onClick:()=>r(!1),children:e.jsx(N,{width:"15",height:"15"})})]}),e.jsx("p",{className:"wy-text-sm  wy-my-4",children:w==="quick"?`Level AAA compliance checks have been enabled. We recommend running a new scan now to view your AAA score and identify non-compliance areas.
2`:`Level AAA compliance checks have been enabled. We recommend running a rescan now to view your AAA score and identify non-compliance areas.
3`}),e.jsxs("div",{className:"wy-flex wy-gap-4 wy-justify-end",children:[e.jsx("button",{className:"wy-border hover:wy-border-webyes-primary/30  wy-text-text13 wy-border-webyes-primary wy-text-webyes-primary wy-px-4 wy-py-2 wy-rounded-md",onClick:()=>r(!1),children:"Close"}),e.jsx("button",{className:"wy-bg-webyes-primary wy-text-text13 hover:wy-bg-webyes-primary/80 wy-text-white wy-px-4 wy-py-2 wy-rounded-md",onClick:h,children:w==="quick"?"New scan":"Rescan"})]})]});return e.jsxs("div",{children:[e.jsx(S,{isOpen:o,closeBtn:!0,content:d}),e.jsxs("div",{className:"wy-px-[34px] wy-py-[42px] wy-border wy-border-[#
3E0E2E7] wy-rounded-md wy-flex wy-flex-col wy-gap-6",children:[e.jsx(L,{}),e.jsxs("div",{className:"wy-flex wy-items-center wy-gap-3.5",children:[e.jsx("label",{className:"wy-text-[15px] wy-font-medium ",htmlFor:"enable-aaa-toggle",children:"Enable Level AAA checks"}),e.jsxs("div",{className:"wy-flex wy-items-center wy-gap-1",children:[e.jsx(V,{disabled:!c||c.slug==="free",checked:n,value:`${n}`,onClick:u,id:"enable-aaa-toggle"}),c&&c.slug==="free"&&e.jsx(O,{})]})]})]})]})}export{T as Route,G as default};

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.