/a11y-ai-action

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

Primary LanguageJavaScriptMIT LicenseMIT

🤖 a11y-ai-action

Build Status XO code style License

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

Usage

See action.yml.

Example workflow:

permissions:
  pull-requests: write

steps:
- uses: actions/checkout@v3

- name: Generate a11y report
  uses: sinedied/a11y-ai-action@v1
  with:
    # One or more glob patterns of files to include
    files: '**/*.html'

# Add a comment with the report if it's a pull request
- uses: actions-ecosystem/action-create-comment@v1
  if: ${{ github.event_name == 'pull_request' }}
  with:
    github_token: ${{ secrets.GITHUB_TOKEN }}
    body: |
      ${{ steps.a11y_ai.outputs.report_md }}

# Upload the report as an artifact
- uses: actions/upload-artifact@v3
  with:
    name: A11y Report
    path: ${{ steps.a11y_ai.outputs.report_path }}

You can a full example setup in this repository.

Notes

This tool is based on a11y-ai.