{"id":19614303,"url":"https://github.com/fpapado/accessible-pipeline","last_synced_at":"2025-07-08T18:35:02.753Z","repository":{"id":34292242,"uuid":"172746814","full_name":"fpapado/accessible-pipeline","owner":"fpapado","description":"Accessibility monitoring, made easy","archived":false,"fork":false,"pushed_at":"2023-01-04T22:48:21.000Z","size":498,"stargazers_count":8,"open_issues_count":31,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-09T22:43:52.907Z","etag":null,"topics":["a11y","accessibility","axe","ci","puppeteer"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fpapado.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-26T16:20:11.000Z","updated_at":"2024-02-09T21:45:02.000Z","dependencies_parsed_at":"2023-01-15T05:57:03.666Z","dependency_job_id":null,"html_url":"https://github.com/fpapado/accessible-pipeline","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fpapado/accessible-pipeline","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fpapado%2Faccessible-pipeline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fpapado%2Faccessible-pipeline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fpapado%2Faccessible-pipeline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fpapado%2Faccessible-pipeline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fpapado","download_url":"https://codeload.github.com/fpapado/accessible-pipeline/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fpapado%2Faccessible-pipeline/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264324510,"owners_count":23590881,"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":["a11y","accessibility","axe","ci","puppeteer"],"created_at":"2024-11-11T10:50:52.248Z","updated_at":"2025-07-08T18:35:02.729Z","avatar_url":"https://github.com/fpapado.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Accessible Pipeline\n\n[![CircleCI](https://circleci.com/gh/fpapado/accessible-pipeline.svg?style=svg)](https://circleci.com/gh/fpapado/accessible-pipeline)\n\n\u003e Accessibility on CI, made easy.\n\n## Motivation\n\nSome accessibility issues can be caught automatically. Things like correct labels, regions, and colour contrast are things that are important to a large amount of users. Still, keeping track of them can get out of hand. Even if a project is \"made accessible\" at one instant in time, there is no guarantee that issues will not creep back in. For those cases, automated accessibility checks can help!\n\nGetting accessibility checks running consistently is hard. Well, not hard, but perhaps a mix of daunting and undocumented.\nThis project tries to change that. We use the established AxE engine in Puppetteer, and we handle a lot of the crawling of pages. By providing a manifest of routes, and a starting URL, you should be able to get a good overview of your pages.\n\nFurthermore, having a solid series of scripts does not say much about running it in CI. Documentation, automation, and concrete references are all things that we want to provide, to make setting up these checks straightforward.\n\n## Getting started\n\nYou will need [node](https://nodejs.org/en/) and [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). Npm typically comes installed with Node.\nWe recommend [using a version manager to install node](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm#using-a-node-version-manager-to-install-nodejs-and-npm). It makes working in different projects easier.\n\nIf you want to dive into the code and develop changes, please refer to the [Development section](#development).\n\nIf you want to run the module (for example, to check a website), then follow the instructions here.\n\nInstall the package:\n\n1) Option 1: using npx\n\nnpx is a utility provided by npm, that allows you to run scripts directly, without installing them globally. If you have npm installed, you most likely have npx already.\n\nIn a terminal, run:\n\n```shell\nnpx accessible-pipeline run https://example.com --ci\n```\n\nAfter the script is done, you can view the report:\n\n```shell\nnpx accessible-pipeline view --file report-XYZ.json\n```\n\n2) Option 2: Installing globally and running\n\n```shell\nnpm install -g accessible-pipeline\n```\n\nRun the crawler with a url:\n\n```shell\naccessible-pipeline run https://example.com --ci\n```\n\nView a stored report:\n\n```shell\naccessible-pipeline view --file report-XYZ.json\n```\n\nBy default, a maximum of 20 pages are crawled, to avoid accidentally bombing a site. Be careful not to set this value too high.\n\nTo change the maximum number of pages crawled to 40:\n\n```shell\naccessible-pipeline run https://example.com --pageLimit 40\n```\n\n## Report Format\n\nThe Report is a JSON list of the AxE results. Each entry has a list of violations, passes etc. It also has a `url`.\nYou can use this JSON file to output to any final format you want. The example one uses the CLI, but you could also build a static site on top of that, or serve it with a server as an API.\n\n## Debugging\n\nIf you want to inspect which pages where visited, and what the options were, the program outputs its state as `state-{POSIX_TIME}.json`. It gives a good overview, and could be used to pin down bugs or new heuristics.\n\nGenerally, if you want to debug some state and errors **consider running without the reporter**, by specifying `--ci`. This will give you the \"raw\" output JSON on the console.\n\nYou can also set the logging level with `LOG_LEVEL`. The default is \"info\", which outputs operational information. Consider `debug` or `trace` to get more insight into the various loops and decisions:\n\n```shell\nLOG_LEVEL=debug accessible-pipeline run https://example.com --ci\n```\n\nIf you are running with `--ci` (but not `--streaming`, which relies on the JSON console log) and want a more readable console output, then you can specify `DEBUG_LOG_PRETTY=true` on the cli.\nThis can be useful if you are trying to debug a specific page on your own machine:\n\n```shell\n# Will have more human-readable output, but not the reporter\nDEBUG_LOG_PRETTY=true accessible-pipeline run https://example.com --ci\n\n# Will exit with an error, because --streaming is meant to forward the logs somewhere for a computer to parse, and it would be undefined behaviour\nDEBUG_LOG_PRETTY=true accessible-pipeline run https://example.com --ci --streaming\n```\n\n## Development\n\nMake sure you follow the [Getting Started](#getting-started) instructions above.\n\nThen, [clone this repository on GitHub](https://help.github.com/en/articles/cloning-a-repository).\n\nFinally, you can install the local dependencies, and run the tests:\n\n```shell\nnpm ci\nnpm test\n```\n\nWhen developing, it might help to run tests in watch mode:\n\n```shell\nnpm test -- --watch\n```\n\nThe main source files are found under `src/`. You can read the [architecture notes](#architeture) below, to learn more about where everything goes.\n\n## Architecture\n\n### CLI\n\n- `run`\n- `view`\n\nThey are made to be independent.\nYou can pipe one into the other, communicating with a common format via `--streaming`:\n\n```shell\naccessible-pipeline run https://example.com --ci --streaming | accessible-pipeline view --streaming\n```\n\nAdding `--ci` to `run` means that it will run without a \"pretty\" reporter, and rather output the raw console logs (formatted as NDJSON, using pino).\n\nOn the other hand, if you run `run` standalone (without `--ci`), then we assume that you might be interested in a readable output. For that reason, the reporter (`view`) is integrated, essentially automating the commands above:\n\n- Standalone `run` is invoked\n- Start a process of `run --ci --streaming`, and forwarding the other options\n- Start a proces of `view --streaming`\n- Pipe the output of the first one into the second\n- Pipe the output into the terminal\n\nRegardless of how you invoke `run`, the final `state` and `report` are written to a file.\nThis allows you to consume the reports in other ways, such as by building a static site, running `accessible-pipeline view --file`, or however you wish!\n\n## Programmatic Use\n\nThe main documentation so far was about CLI use.\nTypically, building things on top of the reports is possible by reading in the output `report-xyz.json` file.\nFor more integrated use cases, however, we also provide a programmatic API.\nIt exposes the core run loop, without touching the filesystem.\n\nYou can use it via the `runCore` function:\n\n```js\nimport {runCore} from 'accessible-pipeline';\n\nasync function main() {\n  const url = new URL('https://example.com/');\n  const {results, state} = await runCore(url, {\n    /* Options */\n  });\n  // Some time later...\n  // Do something with results here\n}\n```\n\nYou can find a full example under [examples/programmatic-use.js](./examples/programmatic-use.js);\n\nWhere the types are:\n\n```ts\nasync function runCore(\n  rootURL: URL,\n  opts: Options\n): Promise\u003c{\n  results: AxeResults[];\n  state: State;\n}\u003e;\n\ntype Options = {\n  /* The maximum number of pages to visit */\n  pageLimit: number;\n  /* The maximum number of retries for a failing page */\n  maxRetries?: number;\n  /* Whether to ignore links of the shape https://example.com#my-id */\n  ignoreFragmentLinks?: boolean;\n  /* A list of extensions to ignore, skipping pages */\n  ignoreExtensions?: Array\u003cstring\u003e;\n  /* Wheter to ignore links of the shape https://example.com/?a=b */\n  ignoreQueryParams?: boolean;\n  /* A path to a route manifest file, used to de-duplicate visited pages and routes */\n  routeManifestPath?: string;\n  /* Whether to expose the streaming logging API, used for advanced, \"live\" reporters */\n  streaming?: boolean;\n};\n```\n\nOur own main \"CLI\" runner, is written on top of `runCore`.\nIn the future, we might provide an async iterator API, that allows you to process each page of results as they come in, instead of having to wait for the full set.\n\n## Roadmap\n\n## Contributing\n\nWe have a [dedicated Contributing guide](/CONTRIBUTING.md). If you are interested in contributing to the project, please read it and let us know!\n\n## Code of Conduct\n\nAny person contributing to this project is required to [abide by our Code of Conduct](/CODE_OF_CONDUCT.md).\n\n## Thanks and Inspiration\n\nThanks to [Deque](https://www.deque.com), for [axe-core](https://github.com/dequelabs/axe-core) and [axe-puppeteer](https://github.com/dequelabs/axe-puppeteer)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffpapado%2Faccessible-pipeline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffpapado%2Faccessible-pipeline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffpapado%2Faccessible-pipeline/lists"}