admin08077/Githubgemini
0
1{"version":3,"file":"accessibilityService-PX6aNbbc.js","sources":["../../services/auditing/accessibilityService.ts"],"sourcesContent":["/**\n * @license\n * SPDX-License-Identifier: Apache-2.0\n*/\nimport * as axe from 'axe-core';\n\n// Configure axe-core to be less noisy in the console\naxe.configure({\n reporter: 'v2',\n rules: [\n { id: 'region', enabled: false } // A common false positive in isolated components\n ]\n});\n\nexport type AxeResult = axe.AxeResults;\n\n/**\n * Runs an axe accessibility audit on a given HTML element.\n * @param context The element or selector string to run the audit on.\n * @returns A promise that resolves with the axe audit results.\n */\nexport const runAxeAudit = async (context: axe.ElementContext): Promise<AxeResult> => {\n try {\n const results = await axe.run(context, {\n resultTypes: ['violations', 'incomplete']\n });\n return results;\n } catch (error) {\n console.error('Error running axe audit:', error);\n throw new Error('Accessibility audit failed to execute.');\n }\n};"],"names":["axe.configure","runAxeAudit","context","axe.run","error"],"mappings":"2CAAA;AAAA;AAAA;AAAA,EAOAA,EAAAA,UAAc,CACV,SAAU,KACV,MAAO,CACH,CAAE,GAAI,SAAU,QAAS,EAAA,CAAM,CAEvC,CAAC,EASM,MAAMC,EAAc,MAAOC,GAAoD,CAClF,GAAI,CAIA,OAHgB,MAAMC,EAAAA,IAAQD,EAAS,CAClC,YAAa,CAAC,aAAc,YAAY,CAAA,CAC5C,CAEL,OAASE,EAAO,CACZ,cAAQ,MAAM,2BAA4BA,CAAK,EACzC,IAAI,MAAM,wCAAwC,CAC5D,CACJ"}