No description
  • JavaScript 84%
  • Shell 16%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Abdul Ahmad 6f70611f5c
Merge pull request #102 from github/dependabot/npm_and_yarn/dependencies-532807973a
chore(deps): bump markdownlint from 0.41.0 to 0.41.1 in the dependencies group
2026-07-20 13:31:01 +00:00
.github chore(deps): bump actions/checkout from 6 to 7 2026-06-22 01:43:38 +00:00
node_modules chore: remove vitest cache artifact from commit 2026-06-25 16:00:47 +00:00
src Migrate test runner from Jest to Vitest 2026-06-24 20:36:25 +00:00
.all-contributorsrc Update @cooljeanius as a contributor 2026-06-25 13:07:42 -04:00
.gitignore Use AST parser to validate alt text - markdown-lint (#33) 2023-10-13 09:41:48 -07:00
action.yml Update action.yml (#64) 2025-01-29 13:31:44 -08:00
CODE_OF_CONDUCT.md Add accessibility-alt-text-bot 2023-04-24 10:32:03 -07:00
CONTRIBUTING.md Add accessibility-alt-text-bot 2023-04-24 10:32:03 -07:00
LICENSE.txt Add accessibility-alt-text-bot 2023-04-24 10:32:03 -07:00
package-lock.json chore(deps): bump markdownlint in the dependencies group 2026-07-20 01:42:59 +00:00
package.json chore(deps): bump markdownlint in the dependencies group 2026-07-20 01:42:59 +00:00
queries.sh Update queries.sh 2023-05-31 15:27:32 -04:00
README.md Update @cooljeanius as a contributor 2026-06-25 13:07:42 -04:00
SECURITY.md Add accessibility-alt-text-bot 2023-04-24 10:32:03 -07:00
SUPPORT.md Add accessibility-alt-text-bot 2023-04-24 10:32:03 -07:00

Accessibility-alt-text-bot

This action reminds users to add a meaningful alternative text to their images. Alternative text helps users who rely on tools like screen readers, and lowers accessibility barriers.

The action can check:

  • Issue comments
  • Issue descriptions
  • Pull Request comments
  • Pull Request descriptions
  • Discussion comments
  • Discussion descriptions

To learn how to write good alternative text, read Alternative text for images on Primer.

Why you may need this action

Images on GitHub default to using the filename as alt text. This action flags when the alt text has not been updated from the default:

Screenshot of an automated actions comment on a GitHub issue that says, 'Uh oh! @monalisa, the image you shared is missing helpful alt text...' and contains instructions for setting alt text

Tip

Normally, setting alt="" marks images as decorative. But GitHub renders all images as a link. To avoid rendering links with no names, we recommend always setting alt text on images in GitHub.

How to add this action to your repo

Copy this workflow into any repo you want the accessibility-alt-text-bot to run in:

name: Accessibility-alt-text-bot
on:
  issues:
    types: [opened, edited]
  pull_request:
    types: [opened, edited]
  issue_comment:
    types: [created, edited, deleted]
  discussion:
    types: [created, edited]
  discussion_comment:
    types: [created, edited, deleted]

permissions:
  issues: write
  pull-requests: write
  discussions: write

jobs:
  accessibility_alt_text_bot:
    name: Check alt text is set on issue or pull requests
    if: ${{ !endsWith(github.actor, '[bot]') }}
    runs-on: ubuntu-latest
    steps:
      - name: Get action 'github/accessibility-alt-text-bot'
        uses: github/accessibility-alt-text-bot@v1.7.2  # Set to latest

Pin the action's version for stability

We recommend you pin the action to a specific version. This makes sure you stay on a stable version of this action.

       uses: github/accessibility-alt-text-bot@v1.7.2

Replace the ref value with any commit hash.

Experimental: Adding a custom linting configuration

If you would like to include more linting rules from the markdownlint or markdownlint-github rulesets, pass a config object to the github/accessibility-alt-text-bot action.

⚠ Consider adding new rules sparingly, as excessive rules could make the bot too noisy and overwhelm users.

⚠ This feature is experimental and may be removed in the future. We acknowledge that some repositories may want to implement more accessibility checks and aim to evaluate how users this feature before making it generally available.

    steps:
      - name: Check alt text
        uses: github/accessibility-alt-text-bot@v1.7.2
        with:
          config: |
            no-default-alt-text: true,
            no-alt-text: true,
            no-empty-alt-text: true,
            no-generic-link-text: true,

License

This project is licensed under the terms of the MIT open source license. Please read the MIT license file for the full terms.

Maintainers

See CODEOWNERS.

Support

TODO: Be explicit about support expectations.

Acknowledgement

Please read our Contributing Guide for more information.

Contributors

Thanks goes to these wonderful people (emoji key):

Katie Foster
Katie Foster

🤔
Kendall Gassner
Kendall Gassner

💻 📖 🚇
Kate Higa
Kate Higa

💻 📖 🚇
HonkingGoose
HonkingGoose

📖
Eric Gallager
Eric Gallager

🚧 🤔

This project follows the all-contributors specification. Contributions of any kind welcome!