Skip to content

Warning

You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?

Accessibility alt text bot

Actions
This action will check a repos issue, discussion, or PR for correct alt text usage
v1.2.0
Verified creator
Star (78)

Verified

GitHub has manually verified the creator of the action as an official partner organization. For more info see About badges in GitHub Marketplace.

Accessibility-alt-text-bot

This action supports accessible content sharing on GitHub by leaving an automated reminder whenever an image is shared on a GitHub Issue, Pull request, or Discussion without meaningful alternative text (alt text). Alternative text helps convey the context of the image to those who use assistive technologies such as a screen reader and removes accessibility barriers.

For guidance on setting alternative text, see Alternative text for images on Primer.

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

Note: Ordinarily, setting alt="" will mark images as decorative. However, GitHub currently 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]
  discussion:
    types: [created, edited]
  discussion_comment:
    types: [created, edited]

permissions:
  issues: write
  pull-requests: write
  discussions: write
  
jobs:
  accessibility_alt_text_bot:
    name: Check alt text is set on issue or pull requests
    runs-on: ubuntu-latest
    if: ${{ github.event.issue || github.event.pull_request || github.event.discussion }}
    steps:
      - name: Get action 'github/accessibility-alt-text-bot'
        uses: github/accessibility-alt-text-bot

Action stability

To ensure you stay on a stable version of this action consider locking the action to a specific version.

       uses: github/[email protected]

Replace the ref value with any commit hash.

License

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

Maintainers

See CODEOWNERS.

Support

TODO: Be explicit about support expectations.

Acknowledgement

Please read 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

💻 ️️️️♿️ 📖 🚇

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

Accessibility alt text bot is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

This action will check a repos issue, discussion, or PR for correct alt text usage
v1.2.0

Verified

GitHub has manually verified the creator of the action as an official partner organization. For more info see About badges in GitHub Marketplace.

Accessibility alt text bot is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.