Your alt text passes automated checks. That doesn’t mean it’s any good.
We built a plugin for the GitHub Accessibility Scanner to make sure your alt text is actually accessible. Here's how it works. The post Your alt text passes automated checks. That doesn’t mean it’s any good. appeared first on The GitHub Blog .
A recent study found that more than one in four images on the most popular homepages of websites have poor alt text. Alt text is a crucial HTML attribute that describes the content of an image, making it accessible to visually impaired users. However, the quality of alt text is often vague, missing, or copied from adjacent images. While automated tools can flag missing alt text, they struggle with providing useful descriptions for poorly written alt text.
To address this issue, a team built an alt text plugin for the GitHub Accessibility Scanner. This plugin uses several deterministic rules to identify poor alt text, which require no credentials and no external network calls. These rules cover cases such as missing alt text, alt text that is just a filename or placeholder, and alt text that is a generic word describing the medium instead of the content.
Additionally, the plugin checks for repeated alt text across adjacent images, which can make a screen reader user's experience less helpful.
However, determining the quality of alt text can be subjective. For example, an alt text like "3/5 stars" might be deemed acceptable in one context but not in another. To tackle this problem, the plugin uses a vision model in conjunction with the image content and surrounding context to make judgments that the alt text string alone cannot.
The plugin extracts page context, such as the nearest heading, page title, and nearby prose, and feeds this information to the model to provide a more comprehensive assessment of the alt text quality.
Written by urgent.news from GitHub Blog's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.