{"id":15478372,"url":"https://github.com/dikshita25/pa11y-e2e-tests","last_synced_at":"2026-05-05T08:32:31.374Z","repository":{"id":59144879,"uuid":"526561639","full_name":"Dikshita25/pa11y-e2e-tests","owner":"Dikshita25","description":"Aider for performing accessibility testing using Pa11y and Puppeteer","archived":false,"fork":false,"pushed_at":"2022-11-21T07:10:12.000Z","size":20,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-09T12:52:47.005Z","etag":null,"topics":["a11y","accessibility","automation","automation-framework","automation-test","axe","deque","html-codesniffer","htmlcodesniffer","javascript","nodejs","pa11y","pa11y-runner","puppeteer"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Dikshita25.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-19T10:25:42.000Z","updated_at":"2024-01-12T07:50:21.000Z","dependencies_parsed_at":"2022-09-13T22:51:16.039Z","dependency_job_id":null,"html_url":"https://github.com/Dikshita25/pa11y-e2e-tests","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Dikshita25/pa11y-e2e-tests","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dikshita25%2Fpa11y-e2e-tests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dikshita25%2Fpa11y-e2e-tests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dikshita25%2Fpa11y-e2e-tests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dikshita25%2Fpa11y-e2e-tests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dikshita25","download_url":"https://codeload.github.com/Dikshita25/pa11y-e2e-tests/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dikshita25%2Fpa11y-e2e-tests/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272900157,"owners_count":25012033,"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","status":"online","status_checked_at":"2025-08-30T02:00:09.474Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","automation","automation-framework","automation-test","axe","deque","html-codesniffer","htmlcodesniffer","javascript","nodejs","pa11y","pa11y-runner","puppeteer"],"created_at":"2024-10-02T04:03:46.948Z","updated_at":"2026-05-05T08:32:31.331Z","avatar_url":"https://github.com/Dikshita25.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Run accessibility tests using Pa11y and Puppeteer\nThis package allows you to run accessibility tests using [Pa11y](https://pa11y.org/) which is an automated testing pal.\n\n#### Installation\n1. Install the package using command:\n```\nnpm install -g pa11y-e2e-tests\n```\n#### Configuration\n1. A configuration file should be created in-order to get started with accessibility testing, which will contain pre-defined test settings for running the tests againist browsers etc.\n\nHere's an extract of `pa11y.config.js`:\n`github.com/pa11y-examples/.../pa11y.config.js`\n```\nmodule.exports = {\n  launch_url: \"https://www.saucedemo.com\",\n  src_folders: \"tests\",\n  reports_path: \"reports\",\n  reporter: [\"json\", \"html\"],\n  test_settings: {\n    runners: [\n      'axe',\n      'htmlcs'\n    ],\n    standard: 'WCAG2A',\n    timeout: 120000,\n    includeNotices: true,\n    includeWarnings: true\n  },\n  puppeteer_settings: {\n    headless: false,\n    executablePath: '/Applications/Google\\ Chrome.app/Contents/MacOS/Google\\ Chrome'\n  }\n};\n```\nThe above `config` contains couple of configurations: \n* launch_url : contains the default url to be launched by the browser\n* src_folders: Need to define the folder name which contains tests to be run\n* reports_path: Location to be specified for test results to be saved\n* reporter: Specify the kind of reports needs to be generated. Currently supports 2 formats i.e `json` and `html`\n* test_settings: Below are the default settings that will be passed during test execution:\n\n| Name            | Types   | Default | description                               |\n| :----------     |:------: | :------:| ----------------------------------------- |\n| runners         | array   | none    | An array of runner names which correspond to    existing and installed pa11y runners, If runner is not found then pa11y will throw error |\n| standard        | string  | WCAG2AA | The accessibility standard to use when testing pages. This should be one of WCAG2A, WCAG2AA, or WCAG2AAA. Note: only used by htmlcs runner |\n| timeout         | integer | none    | The time in milliseconds that a test should be allowed to run before calling back with a timeout error.Please note that this is the timeout for the entire test run (including time to initialise Chrome, load the page, and run the tests) |\n| includeNotices  | boolean | false   | Whether to include results with a type of notice in the Pa11y report.Issues with a type of notice are not directly actionable and so they are excluded by default. You can include them by using this option |\n| includeWarnings | boolean | false   | Whether to include results with a type of warning in the Pa11y report. Issues with a type of warning are not directly actionable and so they are excluded by default.You can include them by using this option |\n\n* puppeteer_settings: Puppeteer is used internally to launch the browser. Puppeteer by default uses Chromium in headless mode, however the user can defined the necessary configurations mentioned in the official documentation [link](https://github.com/puppeteer/puppeteer#default-runtime-settings)\n\n2. Create a `firstTest.js` under `tests` folder :\n```\nmodule.exports = {\n  url: `${process.env.BASE_URL}/`,\n  actions: [\n    'set field #username to standard_user',\n    'set field #password to secret_sauce',\n    'click element input[name=login-button]',\n    'wait for element div[class=\"app_logo\"] to be visible'\n  ]\n}\n```\n3. Run the command and observe the coverage of a11y (accessibility) issues\n* To run all the tests under `tests` folder, use command:\n```\nnpm run runAccessibility\n```\n* To run only a specific test from the `tests` folder, use command:\n```\nrunAccessibility --test tests/firstTest.js\n```\n\n#### Example\nSample repository for [references](https://github.com/Dikshita25/pa11y-example-tests)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdikshita25%2Fpa11y-e2e-tests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdikshita25%2Fpa11y-e2e-tests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdikshita25%2Fpa11y-e2e-tests/lists"}