Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

a11y-ai

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

a11y-ai

Experimental tool to automatically detect accessibility issues in web pages using OpenAI and provide suggestions for fixing them

  • 0.10.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
increased by400%
Maintainers
1
Weekly downloads
 
Created
Source

:robot: a11y-ai

NPM version Build Status Node version XO code style License

Experimental tool to automatically detect accessibility issues in web pages using OpenAI and provide suggestions for fixing them.

a11y-ai portrait by another AI

Can I help fixing your a11y issues?

Quickstart

Run it directly on your project without installing it:

npx a11y-ai

It will scan for all HTML files in the current directory and subdirectories, and will interactively ask you to apply each suggestions found.

Installation

npm install -g a11y-ai

Usage

Usage: a11y <command> <files> [options]

If no files are specified, it will scan the current directory and
subdirectories for HTML files.

Commands:
  s, scan                 Scan files or URLs for accessibility issues

  f, fix                  Fix accessibility issues interactively
    -i, --issues <issues> Comma-separated list of issues to fix (disable scan)
    -c, --char-diff       Use character diff instead of patch-like diff
    -y, --yes             Apply fixes without prompting
    --context <context>   Provide additional context
    --gpt-diff            Make AI generate diff of fixes (experimental)

  r, report               Generate a report of issues with fix suggestions
    -i, --issues <issues> Comma-separated list of issues to fix (disable scan)
    -o, --format <format> Report format [html, md] (default: html)
    --context <context>   Provide additional context
    --gpt-diff            Make AI generate diff of fixes (experimental)

General options:
  --api                   Use specified API URL
  --verbose               Show detailed logs
  --help                  Show this help

You can also set the API URL using the A11Y_AI_API environment variable.

Automated reports

You can generate a report of all the issues found in your project automatically on your CI/CD using this GitHub Action: sinedied/a11y-ai-action

You can see a complete example workflow in action on this repository.

Limitations

  • Windows support outside of WSL2 is currently not working due to a bug in Axe CLI (WIP)
  • If file is too large, the API will return an error 500 (WIP)
  • It needs a matching Chrome version to work (WIP)
  • Issue scanning is only supported for HTML files, not for JS/TS components

Keywords

FAQs

Package last updated on 02 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc