{"id":13496558,"url":"https://github.com/forsti0506/a11y-sitechecker","last_synced_at":"2025-07-13T18:31:38.192Z","repository":{"id":36959310,"uuid":"324805902","full_name":"forsti0506/a11y-sitechecker","owner":"forsti0506","description":"Automatic accessibility checker with website crawling + screenshots for easy use","archived":false,"fork":false,"pushed_at":"2024-03-16T19:44:40.000Z","size":3730,"stargazers_count":54,"open_issues_count":27,"forks_count":8,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-07T16:39:21.978Z","etag":null,"topics":["accessibility","accessibility-criteria","accessibility-testing","axe","crawler","hacktoberfest","open-source","puppeteer","typescript","typescript-library"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/forsti0506.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-27T16:48:10.000Z","updated_at":"2025-02-23T17:17:50.000Z","dependencies_parsed_at":"2024-03-16T21:44:42.753Z","dependency_job_id":"022908b1-cfaf-4315-912d-90cb785064ef","html_url":"https://github.com/forsti0506/a11y-sitechecker","commit_stats":null,"previous_names":[],"tags_count":82,"template":false,"template_full_name":null,"purl":"pkg:github/forsti0506/a11y-sitechecker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forsti0506%2Fa11y-sitechecker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forsti0506%2Fa11y-sitechecker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forsti0506%2Fa11y-sitechecker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forsti0506%2Fa11y-sitechecker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/forsti0506","download_url":"https://codeload.github.com/forsti0506/a11y-sitechecker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forsti0506%2Fa11y-sitechecker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265186703,"owners_count":23724724,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["accessibility","accessibility-criteria","accessibility-testing","axe","crawler","hacktoberfest","open-source","puppeteer","typescript","typescript-library"],"created_at":"2024-07-31T19:01:51.603Z","updated_at":"2025-07-13T18:31:37.820Z","avatar_url":"https://github.com/forsti0506.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# a11y-sitechecker\n\n[![npm version](https://badge.fury.io/js/a11y-sitechecker.svg)](https://badge.fury.io/js/a11y-sitechecker)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/cc8d2ac7f50c487db55ff311a8ac351e)](https://www.codacy.com/gh/forsti0506/a11y-sitechecker/dashboard?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=forsti0506/a11y-sitechecker\u0026utm_campaign=Badge_Grade)\n![Commits since last release](https://img.shields.io/github/commits-since/forsti0506/a11y-sitechecker/latest?color=green\u0026style=flat-square)\n![Libraries.io dependency status for GitHub repo](https://img.shields.io/librariesio/github/forsti0506/a11y-sitechecker)\n![Downloads per month](https://img.shields.io/npm/dm/a11y-sitechecker)\n\nA11y-sitecheker is a tool to check a site against accessibility criteria. It\nuses \u003ca href=\"https://github.com/dequelabs/axe-core\"\u003eaxe-core\u003c/a\u003e with the option to combine results of multiple sites.\nOn the one hand there is the option to let the tool crawl your whole site and on the other site you can provide urls\nwhich should be checked by the tool. The results are printed to the console, saved as JSONs or returned. The tool\ncan be called by javascript or directly by command line. Additionally there are Images created which indicates the\nerrors, shows the tab-order and other features.\n\n## Features\n\n- Crawls Websites automatically for accessibility issues\n    - In addition clicking all Clickable Items (Alpha Status)\n- Analyze a Set of URLs agains accessibility criteria\n- Provide Images for\n    - Tab-Order (A C means you have to check if there are click and key interaction is possible!)\n    - Errors highlighted\n    - View of site in general\n- Results for different viewports\n\n## Test Coverage\n\n| Statements                                                                         | Branches                                                                      | Functions                                                                        | Lines                                                                    |\n|------------------------------------------------------------------------------------|-------------------------------------------------------------------------------|----------------------------------------------------------------------------------|--------------------------------------------------------------------------|\n| ![Statements](https://img.shields.io/badge/statements-44.36%25-red.svg?style=flat) | ![Branches](https://img.shields.io/badge/branches-38.87%25-red.svg?style=flat) | ![Functions](https://img.shields.io/badge/functions-44.85%25-red.svg?style=flat) | ![Lines](https://img.shields.io/badge/lines-45.56%25-red.svg?style=flat) |\n\n### Install\n\n```properties\nnpm install a11y-sitechecker | yarn add a11y-sitechecker\n```\n\n### Usage\n\n#### Commandline\n\nYou can use it in your package.json or in your console like the following:\n\n```properties\na11y-sitechecker --config=config.json -T=1000\n```\n\nThe available options on the commandline are:\n\n```properties\n-j | --json: \"Output results as JSON. Otherwise output is displayed on the console\"\n--config \u003cstring\u003e: \"Provide a config.json\"\n-T, --threshold \u003cnumber\u003e \"permit this number of errors, warnings, or notices, otherwise fail with exit code 2\"\n```\n\n#### Typescript\n\nCall the entry function in your code and use the provided interfaces. The result is an array which contains a result for\nevery specified viewport. Only return defined if there is console output or not.\n\n```typescript\nexport async function entry(\n    config: Config,\n    axeSpecs: Spec,\n    url: string,\n    onlyReturn?: boolean,\n): Promise\u003cA11ySitecheckerResult[]\u003e;\n```\n\n### Configuration File Options\n\nEvery option can be inserted in a json Format and wil be parsed at startup. Examples are below, how to define it in a\njson file!\n\n#### Overview\n\n```typescript\nexport interface Config {\n    json: boolean;\n    resultsPath: string;\n    resultsPathPerUrl: string;\n    axeConfig?: AxeConfig;\n    login?: Login;\n    saveImages?: boolean;\n    imagesPath?: string;\n    launchOptions?: LaunchOptions;\n    ignoreElementAttributeValues?: string[];\n    urlsToAnalyze: string[];\n    clickableItemSelector?: string;\n    analyzeClicks?: boolean;\n    analyzeClicksWithoutNavigation?: boolean;\n    threshold: number;\n    timeout: number;\n    debugMode: boolean;\n    viewports: SitecheckerViewport[];\n    resultTypes: resultGroups[];\n    idTags?: IdTag;\n    runOnly: RunOnly | TagValue[] | string[];\n    crawl: boolean;\n    name: string;\n    cookieSelector?: string; // provide a selector for clicking cookie consent button (example: \"[id*=cookie] a, [class*=cookie] a, [id*=cookie] button, [class*=cookie] button, [id*=didomi] button\")\n    cookieText?: string; //provides a text for cookie consent text (example: \"^(Alle akzeptieren|Akzeptieren|Verstanden|Zustimmen|Okay|OK|Alle Cookies akzeptieren)$\")\n    screenshotPadding?: number; //padding for making screenshots (Standardvalue is 10). Sometime you like to see more of the element, because you are using small elements, like icon Buttons to check\n}\n```\n\n#### Config Option Details\n\nEvery configuration which is not inserted in the config file is by default false or undefined if not explicitly\nmentioned!\n\n##### Name\n\nThe name is the major element to identify your run! You have to provide it\n\n```json\n{\n  \"name\": \"MyName\"\n}\n```\n\n##### JSON Output\n\nDefine if output should be to a json file. You can additionally add a path to store the results.json file!\n\n```json\n{\n  \"json\": true,\n  \"resultsPath\": \"to a folder, starting with the folder where the script is executed\"\n}\n```\n\n##### Axe-core Language\n\nIf you like to choose your own language for the axe-core results, you can define a locale from the standard locales your\nyou can provide your own locale with a path!\n\n```json\n{\n  \"axeConfig\": {\n    \"locale\": \"de\",\n    \"localePath\": \"path to locale\"\n  }\n}\n```\n\n##### Login steps\n\nIf your site need some login steps you can define it here! The input array defines the elements with css-selectors where\nyou like to input the value! In the end you have to define the button which is clicked after the form is filled! You can\nrepeat this steps if needed!\n\n```json\n{\n  \"login\": {\n    \"url\": \"http://myloginurl.at\",\n    \"steps\": [\n      {\n        \"input\": [\n          {\n            \"selector\": \"#user_login\",\n            \"value\": \"user\"\n          },\n          {\n            \"selector\": \"#user_pass\",\n            \"value\": \"passwort\"\n          }\n        ],\n        \"submit\": \"#wp-submit\"\n      }\n    ]\n  }\n}\n```\n\n##### Images\n\nIf you like to take Screenshots during the evaluation, define it here! The images are saved in a folder images under the\nresults path!\n\n```json\n{\n  \"saveImages\": true\n}\n```\n\n##### Launch Options\n\nYou can define launch Options for puppeteer. Please see the\ndocumentation \u003ca href=\"https://github.com/puppeteer/puppeteer/blob/main/docs/api/puppeteer.launchoptions.md\"\u003ehere\u003c/a\u003e\n\n```json\n{\n  \"launchOptions\": {}\n}\n```\n\n##### Ignoring Elements\n\nYou can define string which should lead to ignored links and button clicks. Usually if you a are in a logged in context\nthe crawle should not do a logout!\n\n```json\n{\n  \"ignoreElementAttributeValues\": [\n    \"logout\"\n  ]\n}\n```\n\n##### Links to Analyze\n\nYou have to define the links you like to analyze. If you specify 1 link, you can use the crawl function, which crawls\nthen the url. If you provide more then 1 url, you are not allowed to set crawl to true. It is by default false!\n\n```json\n{\n  \"urlsToAnalyze\": [\n    \"www.test.at\"\n  ],\n  \"crawl\": true\n}\n```\n\n##### Analyzing Clicks\n\nIt is possible to analyze clickable Items, which are not links (buttons who change the view,...). By default it searches\nby this selector : \"button, select, details, [tabindex]:not([tabindex=\"-1\"])\" You can activate this by:\n\n```json\n{\n  \"analyzeClicks\": true,\n  \"clickableItemSelector\": \"button, details\"\n}\n```\n\n##### Clicks without Navigation\n\nIt is possible to analyze button clicks which does not affect the url. If you like to use this feature activate it here!\n\n```json\n{\n  \"analyzeClicksWithoutNavigation\": true\n}\n```\n\n##### Deactive analyze of clicks\n\nYou can activate/deactive the analyze of clicks (alpha status). Standard is false!\n\n```json\n{\n  \"analyzeClicks\": true\n}\n```\n\n##### Threshold and Timeout\n\nYou can specify a timeout in ms for operations which can lead to errors (for example a selector is not found). To cause\nthe console to end with an error if there are more errors than allowed (for example in build pipelines) you can specifiy\na threshold (same like in the command line). Standard: threshold 0, timeout 30000\n\n```json\n{\n  \"threshold\": 100,\n  \"timeout\": 1000\n}\n```\n\n##### DebugMode\n\nActivating the debugMode leads to more logs presented in the console output. By default it is false\n\n```json\n{\n  \"debugMode\": true\n}\n```\n\n##### Specifiying viewport\n\nViewports are used for different devices. Sometimes there are different elements which can cause new or other\naccessibility problems! Standard viewport ist 1920\\*1080!\n\n```json\n{\n  \"viewports\": [\n    {\n      \"width\": 1920,\n      \"height\": 1080\n    }\n  ]\n}\n```\n\n##### Result types\n\nResult types are used to reduce effort for\naxe-core (\u003ca href=\"https://www.deque.com/axe/core-documentation/api-documentation/\"\u003eDocumentation\u003c/a\u003e)\nStandard is violations and incomplete!\n\n```json\n{\n  \"resultTypes\": [\n    \"violations\",\n    \"incomplete\"\n  ]\n}\n```\n\n##### ID-Tags\n\nID-Tags are used to mark axe-core rules with own Tags (for example if someone wants to know only these results)\n\n```json\n{\n  \"idTags\": {\n    \"aria-required-attr\": [\n      \"XYZ\"\n    ],\n    \"meta-viewport\": [\n      \"XYZ\"\n    ]\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fforsti0506%2Fa11y-sitechecker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fforsti0506%2Fa11y-sitechecker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fforsti0506%2Fa11y-sitechecker/lists"}