{"_id":"apca-check","_rev":"6-3593fbb438f4c783e073d8909ee2f4d2","name":"apca-check","dist-tags":{"latest":"0.1.1"},"versions":{"0.0.4":{"name":"apca-check","version":"0.0.4","keywords":["accessibility","a11y","axe","axe-core","apca"],"license":"MIT","_id":"apca-check@0.0.4","maintainers":[{"name":"giamir","email":"giamir.buoncristiani@gmail.com"}],"homepage":"https://github.com/StackExchange/apca-check#readme","bugs":{"url":"https://github.com/StackExchange/apca-check/issues"},"dist":{"shasum":"c1ccae34b8951ea365556dd95d2f0750d5098cab","tarball":"https://registry.npmjs.org/apca-check/-/apca-check-0.0.4.tgz","fileCount":9,"integrity":"sha512-piVlLSx4Xrx3F0Zyv8FA/308FhmOLTBSQ8F9WroTj+XLfO7isZxhX+uipOyouYWpsIjkXR0w5IQ6/TBXnxXuDQ==","signatures":[{"sig":"MEQCICXmGctORHXwi2BIXTdJYKhbU1Y1iFRgxbuA0O7kbNYlAiBhOk0UlDrZrM3YDVuIjtBsXLORlE/y3S/Wzyo/4k2GZA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14950},"type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"a88c8f67b6f428af6a6280fcbae074eb47f668c0","scripts":{"lint":"eslint ./src","test":"web-test-runner","build":"tsc","release":"npm run build && changeset publish","lint:fix":"eslint ./src --fix","test:watch":"web-test-runner --watch"},"_npmUser":{"name":"giamir","email":"giamir.buoncristiani@gmail.com"},"repository":{"url":"git+https://github.com/StackExchange/apca-check.git","type":"git"},"_npmVersion":"9.8.1","description":"Axe rules to check against APCA bronze and silver+ conformance levels.","directories":{},"_nodeVersion":"18.18.0","dependencies":{"apca-w3":"^0.1.9"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.51.0","prettier":"^3.0.3","typescript":"^5.1.6","@types/apca-w3":"^0.1.1","@changesets/cli":"^2.26.2","@open-wc/testing":"^3.2.0","@web/test-runner":"^0.17.2","@web/dev-server-rollup":"^0.5.2","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.1","@rollup/plugin-commonjs":"^25.0.7","@web/dev-server-esbuild":"^0.4.1","@typescript-eslint/parser":"^6.7.5","@web/test-runner-playwright":"^0.10.1","@changesets/changelog-github":"^0.4.8","@typescript-eslint/eslint-plugin":"^6.7.5"},"peerDependencies":{"axe-core":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apca-check_0.0.4_1698065231094_0.7188351317637036","host":"s3://npm-registry-packages"}},"0.1.0":{"name":"apca-check","version":"0.1.0","keywords":["accessibility","a11y","axe","axe-core","apca"],"license":"MIT","_id":"apca-check@0.1.0","maintainers":[{"name":"itstoragesvc","email":"itstoragesvc@stackoverflow.com"},{"name":"stacks-bot","email":"stacks@stackoverflow.com"},{"name":"giamir","email":"giamir.buoncristiani@gmail.com"},{"name":"abovedave","email":"mr@longworth.to"},{"name":"benkelly","email":"contact+npm@benkelly.me"},{"name":"dancormier","email":"dancormierall@gmail.com"}],"homepage":"https://github.com/StackExchange/apca-check#readme","bugs":{"url":"https://github.com/StackExchange/apca-check/issues"},"dist":{"shasum":"adb6120003a0e137cb54d26687937940335a8cb3","tarball":"https://registry.npmjs.org/apca-check/-/apca-check-0.1.0.tgz","fileCount":9,"integrity":"sha512-8vcFfHj0C3JTCXbcetV/62kMvSMNvV/a0WE/+lyERiCWtN8AysMj8PYo7ZWJp9JdGO6dBmM0ikSh+g0udI2Tyw==","signatures":[{"sig":"MEUCIQDm3L4NFtuKW39ejYGfRR9Cer3/pDQK3R6n5UnoTy+p+QIgGdo3ZyJpUvkkVx4PgH7B7QRwDKEbzmGNQos3mKYSJI4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14950},"type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"0aa7b04cdbcd26bf313b93526bfbc115a66290e3","scripts":{"lint":"eslint ./src","test":"web-test-runner","build":"tsc","release":"npm run build && changeset publish","lint:fix":"eslint ./src --fix","test:watch":"web-test-runner --watch"},"_npmUser":{"name":"stacks-bot","email":"stacks@stackoverflow.com"},"repository":{"url":"git+https://github.com/StackExchange/apca-check.git","type":"git"},"_npmVersion":"9.8.1","description":"Axe rules to check against APCA bronze and silver+ conformance levels.","directories":{},"_nodeVersion":"18.18.2","dependencies":{"apca-w3":"^0.1.9"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.51.0","prettier":"^3.0.3","typescript":"^5.1.6","@types/apca-w3":"^0.1.1","@changesets/cli":"^2.26.2","@open-wc/testing":"^3.2.0","@web/test-runner":"^0.17.2","@web/dev-server-rollup":"^0.5.2","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.1","@rollup/plugin-commonjs":"^25.0.7","@web/dev-server-esbuild":"^0.4.1","@typescript-eslint/parser":"^6.7.5","@web/test-runner-playwright":"^0.10.1","@changesets/changelog-github":"^0.4.8","@typescript-eslint/eslint-plugin":"^6.7.5"},"peerDependencies":{"axe-core":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apca-check_0.1.0_1698066264814_0.15267941857829448","host":"s3://npm-registry-packages"}},"0.1.1":{"name":"apca-check","version":"0.1.1","keywords":["accessibility","a11y","axe","axe-core","apca"],"license":"MIT","_id":"apca-check@0.1.1","maintainers":[{"name":"itstoragesvc","email":"itstoragesvc@stackoverflow.com"},{"name":"stacks-bot","email":"stacks@stackoverflow.com"},{"name":"giamir","email":"giamir.buoncristiani@gmail.com"},{"name":"abovedave","email":"mr@longworth.to"},{"name":"benkelly","email":"contact+npm@benkelly.me"},{"name":"dancormier","email":"dancormierall@gmail.com"}],"homepage":"https://github.com/StackExchange/apca-check#readme","bugs":{"url":"https://github.com/StackExchange/apca-check/issues"},"dist":{"shasum":"da357c3ac8771795a19f80a091dc1aaffedb2a7c","tarball":"https://registry.npmjs.org/apca-check/-/apca-check-0.1.1.tgz","fileCount":9,"integrity":"sha512-4sddIrbFb1db+E5IWJFMIcokNYbFc0Q+hYFBys/N0LZfwVf+fzVaUQ+oR9lyo/B4rO7NHiyytY5StP4MMA6eww==","signatures":[{"sig":"MEQCIFC0tODn5i5qERB/I4lwd88L1EdNXhYSUWulYbp+w0Q5AiBSpfdexe3KjPYt/GkNeJBdIiIqzZjGpTGMb4bpw1Zunw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14967},"type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"ab5871bec03d10ed0de35f170796f253402ab105","scripts":{"lint":"eslint ./src","test":"web-test-runner","build":"tsc","release":"npm run build && changeset publish","lint:fix":"eslint ./src --fix","test:watch":"web-test-runner --watch"},"_npmUser":{"name":"stacks-bot","email":"stacks@stackoverflow.com"},"repository":{"url":"git+https://github.com/StackExchange/apca-check.git","type":"git"},"_npmVersion":"10.8.2","description":"Axe rules to check against APCA bronze and silver+ conformance levels.","directories":{},"_nodeVersion":"20.17.0","dependencies":{"apca-w3":"^0.1.9"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.57.0","prettier":"^3.3.3","typescript":"^5.5.4","@types/apca-w3":"^0.1.3","@changesets/cli":"^2.27.7","@open-wc/testing":"^4.0.0","@web/test-runner":"^0.18.3","@web/dev-server-rollup":"^0.6.4","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.2.1","@rollup/plugin-commonjs":"^26.0.1","@web/dev-server-esbuild":"^1.0.2","@typescript-eslint/parser":"^7.18.0","@web/test-runner-playwright":"^0.11.0","@changesets/changelog-github":"^0.5.0","@typescript-eslint/eslint-plugin":"^7.18.0"},"peerDependencies":{"axe-core":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/apca-check_0.1.1_1725349901775_0.3875563585827766","host":"s3://npm-registry-packages"}}},"time":{"created":"2023-10-23T12:47:11.093Z","modified":"2025-09-23T18:15:02.689Z","0.0.4":"2023-10-23T12:47:11.327Z","0.1.0":"2023-10-23T13:04:25.026Z","0.1.1":"2024-09-03T07:51:41.912Z"},"bugs":{"url":"https://github.com/StackExchange/apca-check/issues"},"license":"MIT","homepage":"https://github.com/StackExchange/apca-check#readme","keywords":["accessibility","a11y","axe","axe-core","apca"],"repository":{"url":"git+https://github.com/StackExchange/apca-check.git","type":"git"},"description":"Axe rules to check against APCA bronze and silver+ conformance levels.","maintainers":[{"email":"djl.fyi@sent.com","name":"abovedave"},{"email":"dancormierall@gmail.com","name":"dancormier"},{"email":"giamir.buoncristiani@gmail.com","name":"giamir"},{"email":"itstoragesvc@stackoverflow.com","name":"itstoragesvc"},{"email":"stacks@stackoverflow.com","name":"stacks-bot"},{"email":"contactomoises1@gmail.com","name":"estoesmoises"}],"readme":"# apca-check\n\n[![ci status][gh-action-badge]][gh-action-url] [![npm version][npm-badge]][npm-url]\n\nThis package contains custom axe rules and checks for [APCA](https://readtech.org/) Bronze and Silver+ [conformance levels](https://readtech.org/ARC/tests/visual-readability-contrast/?tn=criterion).\n\n## Usage\n\n### Installation\n\n```bash\nnpm install --save-dev axe-core apca-check\n```\n\n### Setup\n\n```js\nimport axe from \"axe-core\";\nimport { registerAPCACheck } from 'apca-check';\n\nregisterAPCACheck('bronze'); // or registerAPCACheck('silver');\n\n // consider turning off default WCAG 2.2 AA color contrast rules when using APCA\naxe.configure({\n    rules: [{ id: \"color-contrast\", enabled: false }]\n})\n\naxe.run(document, (err, results) => {\n    if (err) throw err;\n    console.log(results);\n});\n```\n\n### Using custom APCA thresholds\n\nTo set custom thresholds for APCA checks, follow these steps:\n\n1. Use `custom` as the first argument when calling `registerAPCACheck`.\n1. Provide a function as the second argument, optionally accepting `fontSize` and `fontWeight` arguments.\n\n\n```js\nconst customConformanceThresholdFn = (fontSize, fontWeight) => {\n    const size = parseFloat(fontSize);\n    const weight = parseFloat(fontWeight);\n\n    return size >= 32 || weight > 700 ? 45 : 60;\n};\n\nregisterAPCACheck('custom', customConformanceThresholdFn);\n```\n\n## Development\n\n### Prerequisites\n\n- Node.js v18+\n\n### Linting\nTo run eslint (including prettier as a formatter) you can run\n```\nnpm run lint\n```\nTo have eslint fix any autofixable issue run\n```\nnpm run lint:fix\n```\n\n### Testing\n\nTests are run by web-test-runner in combination with playwright against chromium, firefox and webkit\n\n```\nnpm run test\n```\n\nFor watch mode\n```\nnpm run test:watch\n```\n\n### Publishing\n\nWe use [changesets](https://github.com/changesets/changesets) to automatize the steps necessary to publish to NPM, create GH releases and a changelog.\n\n- Every time you do work that requires a new release to be published, [add a changesets entry](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md) by running `npx chageset` and follow the instrcutions on screen. (changes that do not require a new release - e.g. changing a test file - don't need a changeset).\n  - When opening a PR without a corresponding changeset the [changesets-bot](https://github.com/apps/changeset-bot) will remind you to do so. It generally makes sense to have one changeset for PR (if the PR changes do not require a new release to be published the bot message can be safely ignored)\n- The [release github workflow](.github/workflows/release.yml) continuosly check if there are new pending changesets in the main branch, if there are it creates a GH PR (`chore(release)` [see example](https://github.com/StackExchange/apca-check/pull/2)) and continue updating it as more changesets are potentially pushed/merged to the main branch.\n- When we are ready to cut a release we need to simply merge the `chore(release)` PR back to main and the release github workflow will take care of publishing the changes to NPM and create a GH release for us. The `chore(release)` PR also give us an opportunity to adjust the automatically generated changelog when necessary (the entry in the changelog file is also what will end up in the GH release notes).\n\n_The release github workflow only run if the CI workflow (running linter, formatter and tests) is successful: CI is blocking accidental releases_.\n\n_Despite using changesets to communicate the intent of creating releases in a more explicit way, we still follow [conventional commits standards](https://www.conventionalcommits.org/en/v1.0.0/) for keeping our git history easily parseable by the human eye._\n\n## License\nCopyright 2023 Stack Exchange, Inc and released under the [MIT License](/LICENSE.MD).\n`axe-core®` and `axe®` are a trademark of Deque Systems, Inc. in the US and other countries.\n\n\n[gh-action-url]: https://github.com/StackExchange/apca-check/actions/workflows/CI.yml\n[gh-action-badge]: https://github.com/StackExchange/apca-check/actions/workflows/CI.yml/badge.svg?branch=main\n[npm-url]: https://npmjs.org/package/apca-check\n[npm-badge]: https://img.shields.io/npm/v/apca-check.svg","readmeFilename":"README.md"}