GitHub Action

The A11YSmith GitHub Action runs accessibility audits as part of your CI pipeline and posts results as pull request comments.

Basic Usage

- uses: HNguyenLy/a11ysmith-action@v1
  with:
    command: audit-web
    url: https://example.com
    format: json

Inputs

GitHub Action inputs
Input Description Required Default
commandThe audit command to runYes--
urlURL for web auditsNo--
dirDirectory for source auditsNo.
fileFile path(s) for document auditsNo--
formatOutput format (json, markdown, html, all)Nojson
outputReport output directoryNoa11ysmith-output
fail-on-highestFail the workflow if highest-severity issues are foundNotrue
commentPost results as a PR commentNotrue

Outputs

GitHub Action outputs
Output Description
report-pathPath to the generated report file
total-findingsTotal number of findings
highest-countNumber of highest-severity findings
high-countNumber of high-severity findings

Platform-Specific Examples

Web Audit

- uses: HNguyenLy/a11ysmith-action@v1
  with:
    command: audit-web
    url: ${{ env.DEPLOY_URL }}
    format: html
    fail-on-highest: true

Document Audit

- uses: HNguyenLy/a11ysmith-action@v1
  with:
    command: audit-document
    file: ./docs/report.docx
    format: json

Android Source Audit

- uses: HNguyenLy/a11ysmith-action@v1
  with:
    command: audit-android-source
    dir: ./android-app
    format: json

iOS Source Audit

- uses: HNguyenLy/a11ysmith-action@v1
  with:
    command: audit-ios-source
    dir: ./ios-app
    format: markdown

CI Workflow Example

A complete workflow that audits a staging deployment on every pull request:

name: Accessibility Audit

on:
  pull_request:
    branches: [main]

jobs:
  audit:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Deploy to staging
        id: deploy
        run: echo "url=https://staging.example.com" >> "$GITHUB_OUTPUT"

      - name: Run accessibility audit
        uses: HNguyenLy/a11ysmith-action@v1
        with:
          command: audit-web
          url: ${{ steps.deploy.outputs.url }}
          format: markdown
          comment: true
          fail-on-highest: true