LinuxCommandLibrary

gh-accessibility

Add accessibility labels to GitHub issues

TLDR

Open the GitHub Accessibility site in your browser

$ gh [[a11y|accessibility]] [[-w|--web]]
copy

SYNOPSIS

gh accessibility [<repository>] [--json] [--template <string>] [--repo <OWNER/REPO>]

PARAMETERS

<repository>
    Repository path in 'OWNER/REPO' format (defaults to current repository)

--json
    Output results as JSON instead of human-readable format

--template <string>
    Format JSON output using a Go template string

--repo <OWNER/REPO>
    Explicitly select repository overriding default or positional argument

DESCRIPTION

The gh accessibility command is a subcommand of the GitHub CLI (gh) tool. It audits the accessibility status of a GitHub repository by examining open issues and pull requests labeled with accessibility-related terms such as 'a11y', 'accessibility', 'wcag', or similar.

The audit categorizes findings by severity levels (critical, high, medium, low) and provides counts of affected items. It helps developers and teams identify and prioritize accessibility improvements directly from the command line. By default, it targets the current repository's default branch. Output is formatted as a human-readable report, but can be customized to JSON for scripting or further processing.

This tool promotes inclusive development practices, ensuring repositories comply with web accessibility standards like WCAG. It's particularly useful in CI/CD pipelines to enforce accessibility checks before merges. Requires authentication via gh auth login and read access to the repository.

CAVEATS

Requires GitHub CLI installed and authenticated (gh auth login). Limited to open issues/PRs on default branch. Does not fix issues; only reports. Labels must match exact accessibility keywords for detection.

EXAMPLE USAGE

Basic audit: gh accessibility
JSON output: gh accessibility --json
Remote repo: gh accessibility owner/repo --repo owner/repo

OUTPUT FIELDS

Reports include: critical_count, high_count, medium_count, low_count, total_issues, repository.

HISTORY

Introduced in GitHub CLI 2.40.0 (May 2024) to support accessibility auditing amid growing WCAG compliance needs. Developed by GitHub to integrate a11y checks into CLI workflows.

SEE ALSO

gh(1), gh-issue(1), gh-pr(1), git(1)

Copied to clipboard