Giter Site home page Giter Site logo

acot-a11y / acot Goto Github PK

View Code? Open in Web Editor NEW
186.0 6.0 8.0 6.09 MB

:gem: Accessibility Testing Framework. More accessible web, all over the world.

License: MIT License

JavaScript 1.75% TypeScript 95.88% HTML 1.93% Shell 0.36% CSS 0.09%
puppeteer audit accessibility testing-framework testing-tools a11y acot

acot's Introduction

acot

Accessibility Testing Framework

GitHub Workflow Status npm MIT LICENSE


!! THE ACOT IS STILL IN ALPHA STATUS AND MAY BE BROKEN BY THE UPGRADE !!


Overview

More accessible web, all over the world.

acot is an open-source Accessibility Testing Framework that uses headless Chrome (puppeteer) to provide means of testing any website or web app. It supports for making the Web accessible with a flexible, highly reliable rule set that leverages browser-native APIs such as the AOM and DOM.

Reliability

  • By using the results rendered by the browser, a highly reliable audit is possible.
  • acot provides original rules. In addition, it offers rules based on the proven axe.

Extensibility

  • You can use the rules published in the ESLint like plugin system.
  • It's easy to implement and publish the rule sets you need for your team.
  • The divided packages allow you to assemble a custom workflow that works best for your team.

Portability

  • You can create and publish your own configuration with Sharable Config.
  • Provides Custom Runner for integration with Storybook.

Getting Started

Install via npm:

$ npm install --save-dev @acot/cli

# or

$ npm install --save-dev @acot/cli puppeteer

You can build the configuration file and install the dependent packages with the following commands:

$ npx acot init

Running acot init command

And then, the run subcommand performs an audit based on the configuration file.

$ npx acot run

Running acot run command

See the CLI documentation for details.

Configuration

If you use acot as the CLI, you can configure the audit via configuration file.
Usually, when you create a configuration file called acot.config.js, acot will automatically use that configuration file.

The simple configuration is as follows (acot.config.js):

module.exports = {
  presets: ['@acot/wcag'],
  extends: ['preset:@acot/wcag/recommended'],
  origin: 'http://localhost:8000',
  connection: {
    command: 'npm run serve',
  },
  paths: ['/', '/path', '/path/to', '/path/to/dir'],
  rules: {
    '@acot/wcag/interactive-has-enough-size': 'warn',
    '@acot/wcag/page-has-valid-lang': 'off',
    '@example/foo/bar': [
      'error',
      {
        /* options */
      },
    ],
  },
};

See the Configuration for details.

Requirements

Documentation

Packages

acot has a feature which is divided into several packages.

Foundations

Package Description
@acot/core acot core API.
@acot/cli acot command line tool.
@acot/config A module to manipulate configs of acot.

Configs / Presets

Package Description
@acot/acot-config A basic acot rule set.
@acot/acot-preset-wcag A WCAG-based rule set for acot.
@acot/acot-preset-axe An axe rule set for acot.

Runners

Package Description
@acot/acot-runner-sitemap An acot custom runner reading audit pages from sitemap.
@acot/acot-runner-storybook An acot custom runner for Storybook.

Reporters

Package Description
@acot/acot-reporter-pretty An acot default reporter.
@acot/acot-reporter-dot A dot reporter for @acot/cli.
@acot/acot-reporter-github GitHub reporter for @acot/cli.

Utilities

Package Description
@acot/find-chrome Find Chrome available in your runtime environment.
@acot/html-pickup Use the CSS Selector to pick up the elements from the HTML string.
@acot/schema-validator A simple wrapper module for schema-utils.

FAQ

T.B.A

Contributing

We are always welcoming your contribution ๐Ÿ‘

See CONTRIBUTING.md.

License

MIT ยฉ wadackel

acot's People

Contributors

konojunya avatar kuy avatar masup9 avatar quramy avatar renovate-bot avatar rhysd avatar wadackel avatar yamanoku avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

acot's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Warning

These dependencies are deprecated:

Datasource Name Replacement PR?
npm @types/history Unavailable
npm @types/markdown-table Unavailable
npm @types/node-emoji Unavailable
npm @types/prettier Unavailable
npm fastify-static Unavailable
npm npm-run-all Available
npm param-case Unavailable
npm pkg-up Unavailable

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore: replace dependency npm-run-all with npm-run-all2 5.0.0
  • chore: update dependency @types/is-ci to v3.0.4
  • chore: update dependency @types/language-tags to v1.0.4
  • chore: update dependency @types/listr to v0.14.9
  • chore: update dependency @types/micromatch to v4.0.9
  • chore: update dependency @types/mock-fs to v4.13.4
  • chore: update dependency @types/node-emoji to v1.8.2
  • chore: update dependency @types/opener to v1.4.3
  • chore: update dependency @types/reach__router to v1.3.15
  • chore: update dependency @types/serve-handler to v6.1.4
  • chore: update dependency @types/text-table to v0.2.5
  • chore: update dependency @types/unist to v2.0.10
  • chore: update dependency @types/wait-on to v5.3.4
  • chore: update dependency @types/yargs to v16.0.9
  • chore: update dependency got to v11.8.6
  • chore: update dependency postcss to v8.4.39
  • chore: update dependency @sinclair/typebox to ^0.32.0
  • chore: update dependency @types/lodash to v4.17.6
  • chore: update dependency emittery to ^0.13.0
  • chore: update dependency eslint to v8.57.0
  • chore: update dependency eslint-config-prettier to v8.10.0
  • chore: update dependency eslint-plugin-import to v2.29.1
  • chore: update dependency eslint-plugin-jest to v26.9.0
  • chore: update dependency mock-fs to v5.2.0
  • chore: update dependency nock to v13.5.4
  • chore: update dependency node to v16.20.2 (node, @types/node)
  • chore: update dependency prettier-plugin-packagejson to v2.5.0
  • chore: update dependency scaffdog to v1.5.0
  • chore: update dependency turbo to v1.13.4
  • chore: update dependency type-fest to v2.19.0
  • chore: update dependency typescript to v4.9.5
  • chore: update typescript-eslint monorepo to v5.62.0 (@typescript-eslint/eslint-plugin, @typescript-eslint/parser)
  • chore: update actions/checkout action to v4
  • chore: update actions/setup-node action to v4
  • chore: update dependency @types/unist to v3
  • chore: update dependency @types/update-notifier to v6
  • chore: update dependency boxen to v7
  • chore: update dependency cli-truncate to v4
  • chore: update dependency cosmiconfig to v9
  • chore: update dependency emittery to v1
  • chore: update dependency eslint to v9
  • chore: update dependency eslint-config-prettier to v9
  • chore: update dependency eslint-plugin-jest to v28
  • chore: update dependency execa to v9
  • chore: update dependency fastify to v4
  • chore: update dependency figures to v6
  • chore: update dependency filenamify to v6
  • chore: update dependency got to v14
  • chore: update dependency husky to v9
  • chore: update dependency lerna to v8
  • chore: update dependency lint-staged to v15
  • chore: update dependency log-symbols to v6
  • chore: update dependency log-update to v6
  • chore: update dependency mdast-util-to-string to v4
  • chore: update dependency node to v20 (node, @types/node)
  • chore: update dependency node-emoji to v2 (node-emoji, @types/node-emoji)
  • chore: update dependency ora to v8
  • chore: update dependency p-limit to v6
  • chore: update dependency p-series to v3
  • chore: update dependency param-case to v4
  • chore: update dependency parse5 to v7
  • chore: update dependency pkg-up to v5
  • chore: update dependency plur to v5
  • chore: update dependency postcss-cli to v11
  • chore: update dependency postcss-import to v16
  • chore: update dependency postcss-nested to v6
  • chore: update dependency prettier to v3 (prettier, @types/prettier)
  • chore: update dependency pretty-ms to v9
  • chore: update dependency puppeteer to v22
  • chore: update dependency puppeteer-core to v22
  • chore: update dependency rimraf to v6
  • chore: update dependency scaffdog to v4
  • chore: update dependency schema-utils to v4
  • chore: update dependency string-width to v7
  • chore: update dependency tailwindcss to v3
  • chore: update dependency ts-node to v10
  • chore: update dependency turbo to v2
  • chore: update dependency type-fest to v4
  • chore: update dependency typescript to v5
  • chore: update dependency unified to v11
  • chore: update dependency unist-util-select to v5
  • chore: update dependency unist-util-visit-parents to v6
  • chore: update dependency update-notifier to v7
  • chore: update dependency wait-on to v7
  • chore: update dependency yargs to v17 (yargs, @types/yargs)
  • chore: update github artifact actions to v4 (major) (actions/download-artifact, actions/upload-artifact)
  • chore: update jest monorepo to v29 (major) (@types/jest, jest, ts-jest)
  • chore: update remark monorepo to v11 (major) (remark-parse, remark-stringify)
  • chore: update typescript-eslint monorepo to v7 (major) (@typescript-eslint/eslint-plugin, @typescript-eslint/parser)
  • chore: update wagoid/commitlint-github-action action to v6
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

github-actions
.github/workflows/ci.yml
  • actions/checkout v3
  • actions/setup-node v3
  • actions/upload-artifact v3
  • actions/checkout v3
  • actions/setup-node v3
  • actions/checkout v3
  • actions/setup-node v3
  • actions/checkout v3
  • actions/setup-node v3
  • actions/download-artifact v3
.github/workflows/commitlint.yml
  • actions/checkout v3
  • wagoid/commitlint-github-action v4
.github/workflows/labeler.yml
nodenv
.node-version
  • node 16.15.0
npm
package.json
  • @acot/tsconfig 0.1.0
  • @commitlint/cli 16.3.0
  • @commitlint/config-conventional 16.2.4
  • @commitlint/config-lerna-scopes 16.2.4
  • @types/jest 26.0.24
  • @types/markdown-table 2.0.0
  • @types/mock-fs 4.13.1
  • @types/node 16.11.36
  • @typescript-eslint/eslint-plugin 5.25.0
  • @typescript-eslint/parser 5.25.0
  • cross-env 7.0.3
  • eslint 8.15.0
  • eslint-config-prettier 8.5.0
  • eslint-plugin-import 2.26.0
  • eslint-plugin-jest 26.2.2
  • husky 7.0.4
  • jest 26.6.3
  • lerna 4.0.0
  • lint-staged 10.5.4
  • mock-fs 5.1.2
  • npm-run-all 4.1.5
  • prettier 2.6.2
  • prettier-plugin-packagejson 2.2.18
  • rimraf 3.0.2
  • scaffdog 1.2.0
  • ts-jest 26.5.6
  • ts-node 9.1.1
  • turbo 1.2.9
  • type-fest 2.12.2
  • typescript 4.6.4
  • @types/history 5.0.0
  • @types/reach__router 1.3.10
  • history 5.3.0
packages/acot-config/package.json
packages/acot-preset-axe/package.json
  • @sinclair/typebox ^0.23.2
  • axe-core ^4.1.1
packages/acot-preset-wcag/package.json
  • @sinclair/typebox ^0.23.2
  • language-tags ^1.0.5
  • p-limit 3.1.0
  • @types/language-tags 1.0.0
packages/acot-reporter-dot/package.json
  • boxen ^5.0.0
  • chalk ^4.0.0
  • figures ^3.2.0
  • indent-string ^4.0.0
  • log-symbols ^4.0.0
  • log-update ^4.0.0
  • plur ^4.0.0
  • strip-ansi ^6.0.0
packages/acot-reporter-github/package.json
  • @sinclair/typebox ^0.23.2
  • chalk ^4.0.0
  • debug ^4.3.1
  • env-ci 6.0.0
  • got 11.8.3
  • @types/env-ci 3.1.1
  • nock 13.2.4
packages/acot-reporter-pretty/package.json
  • boxen ^5.0.0
  • chalk ^4.0.0
  • cli-table ^0.3.4
  • figures ^3.2.0
  • indent-string ^4.0.0
  • log-symbols ^4.0.0
  • log-update ^4.0.0
  • ora ^5.1.0
  • plur ^4.0.0
  • pretty-ms ^7.0.1
  • strip-ansi ^6.0.0
  • text-table ^0.2.0
  • @types/cli-table 0.3.0
  • @types/text-table 0.2.2
packages/acot-runner-sitemap/package.json
  • @sinclair/typebox ^0.23.2
  • camaro ^6.0.4
  • debug ^4.3.1
  • got 11.8.3
  • lodash ^4.17.19
  • micromatch ^4.0.2
  • puppeteer-core ^13.5.1
  • serve-handler ^6.1.3
  • @types/lodash 4.14.182
  • @types/micromatch 4.0.2
  • @types/serve-handler 6.1.1
packages/acot-runner-storybook/package.json
  • @sinclair/typebox ^0.23.2
  • debug ^4.3.1
  • deepmerge ^4.2.2
  • is-plain-object ^5.0.0
  • micromatch ^4.0.2
  • puppeteer-core ^13.5.1
  • @types/micromatch 4.0.2
packages/acot-runner/package.json
  • debug ^4.3.1
  • emittery ^0.11.0
packages/cli/package.json
  • boxen ^5.0.0
  • chalk ^4.0.0
  • chokidar ^3.4.1
  • debug ^4.3.1
  • enquirer ^2.3.6
  • execa ^5.0.0
  • fast-glob ^3.2.2
  • is-ci ^3.0.0
  • listr ^0.14.3
  • markdown-table ^2.0.0
  • node-emoji ^1.10.0
  • opener ^1.5.2
  • pkg-up ^3.1.0
  • portfinder ^1.0.27
  • prettier ^2.2.0
  • strip-ansi ^6.0.0
  • type-fest ^2.12.2
  • update-notifier ^5.0.1
  • validator ^13.1.17
  • yargs ^16.1.1
  • @types/is-ci 3.0.0
  • @types/listr 0.14.4
  • @types/node-emoji 1.8.1
  • @types/opener 1.4.0
  • @types/prettier 2.6.1
  • @types/update-notifier 5.1.0
  • @types/validator 13.7.2
  • @types/yargs 16.0.4
packages/config/package.json
  • ajv ^6.12.3
  • cosmiconfig ^7.0.0
  • debug ^4.3.1
  • deepmerge ^4.2.2
  • is-plain-object ^5.0.0
  • micromatch ^4.0.2
  • path-type ^4.0.0
  • resolve-from ^5.0.0
  • @types/micromatch 4.0.2
  • param-case 3.0.4
  • typescript-json-validator 2.4.2
packages/connection/package.json
  • debug ^4.3.1
  • execa ^5.0.0
  • wait-on ^5.2.0
  • @types/wait-on 5.3.1
packages/core/package.json
  • debug ^4.3.1
  • emittery ^0.11.0
  • filenamify ^4.1.0
  • lodash ^4.17.19
  • p-series ^2.1.0
  • puppeteer-core ^13.5.1
  • puppeteer-element2selector ^0.0.3
  • @types/lodash 4.14.182
  • puppeteer 13.7.0
packages/document/package.json
  • debug ^4.3.1
  • deepmerge ^4.2.2
  • fast-glob ^3.2.2
  • fastify ^3.8.0
  • fastify-static ^4.0.0
  • indent-string ^4.0.0
  • is-plain-object ^5.0.0
  • log-symbols ^4.0.0
  • mdast-util-to-string ^2.0.0
  • micromatch ^4.0.2
  • mustache ^4.0.1
  • plur ^4.0.0
  • pretty-ms ^7.0.1
  • puppeteer-core ^13.5.1
  • remark-parse ^9.0.0
  • remark-stringify ^9.0.0
  • strip-ansi ^6.0.0
  • type-fest ^2.12.2
  • unified ^9.0.0
  • unist-util-select ^3.0.2
  • unist-util-visit-parents ^3.1.0
  • @types/micromatch 4.0.2
  • @types/mustache 4.1.2
  • @types/unist 2.0.3
  • postcss 8.4.14
  • postcss-cli 8.3.1
  • postcss-import 14.1.0
  • postcss-nested 5.0.6
  • tailwindcss 2.2.19
packages/factory/package.json
  • deepmerge ^4.2.2
  • is-plain-object ^5.0.0
  • type-fest ^2.12.2
packages/find-chrome/package.json
packages/html-pickup/package.json
  • chalk ^4.1.0
  • cli-truncate ^2.1.0
  • css-select ^2.1.0
  • css-select-parse5-adapter ^1.0.0-pre.1
  • parse5 ^6.0.0
  • strip-ansi ^6.0.0
packages/logger/package.json
  • chalk ^4.0.0
  • figures ^3.2.0
  • indent-string ^4.0.0
  • string-width ^4.2.0
  • strip-ansi ^6.0.0
packages/mock/package.json
  • emittery ^0.11.0
packages/module-loader/package.json
  • debug ^4.3.1
packages/reporter/package.json
  • boxen ^5.0.0
  • chalk ^4.0.0
  • cli-table ^0.3.4
  • figures ^3.2.0
  • indent-string ^4.0.0
  • log-symbols ^4.0.0
  • log-update ^4.0.0
  • ora ^5.1.0
  • plur ^4.0.0
  • pretty-ms ^7.0.1
  • strip-ansi ^6.0.0
  • text-table ^0.2.0
  • @types/cli-table 0.3.0
  • @types/text-table 0.2.2
packages/runner/package.json
  • debug ^4.3.1
  • emittery ^0.11.0
packages/schema-validator/package.json
  • @types/json-schema ^7.0.5
  • schema-utils ^3.0.0
packages/types/package.json
  • puppeteer-core ^13.5.1
  • type-fest ^2.12.2
packages/utils/package.json
  • puppeteer-core ^13.5.1
  • resolve-from ^5.0.0

  • Check this box to trigger a request for Renovate to run again on this repository

[BUG] Failed to run `init` and `run` because did'nt install 'acot@latest'

Describe the bug

I had run the command npx acot init. Then it failed to run with throwing the below error.

npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/acot - Not found
npm ERR! 404 
npm ERR! 404  'acot@latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

I run npx acot run but it failed too.

Environment

  • OS: macOS 10.15.7
  • node: v14.16.0
  • npm: v7.6.3

[FEATURE_REQUEST] Make the URL to be waited for contain a path.

Is your feature request related to a problem? Please describe.

When an application does not have a /, wait-on requests to origin will return a 404.

Describe the solution you'd like

By including the 0th path specified in paths in the origin URL and waiting on it, users who want to use acot can use it if the page they want to test can return 200.

Describe alternatives you've considered

Make it possible to write wait-on config in acot.config.js. For example

module.exports = {
  extends: ['@acot'],
  connection: {
    command: 'yarn start',
  },
  origin: 'http://localhost:3000',
  paths: ['/foo'],
  internal: {
    waitOn: {
      validateStatus: () => true,
    },
  },
};

[FEATURE_REQUEST] acot can't audit sites that return 404 responses to HEAD requests

Is your feature request related to a problem? Please describe.

By default, https://github.com/jeffbski/wait-on waits for a 2xx response to HEAD requests.
Some HTTP servers do not implement the HEAD method and may return a 404 response.

e.g. https://mdn.mozillademos.org/ja/docs/Web/CSS/:focus$samples/Example

Describe the solution you'd like

acot uses http-get instead of http to wait
ref: https://github.com/jeffbski/wait-on/blob/546f1bffde125af8aef5ff196aca8454726b21c7/lib/wait-on.js#L63-L66

Describe alternatives you've considered

Change to another library.

Additional context

To use the GET method for wait-on, I need to put origin: 'http-get://localhost:8080' in acot.config.js, but this is not a legal URL.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.