Tangentially related comment: From webcomics like xkcd or SMBC, I was under the impression that alt text is automatically displayed on mouse hover, but apparently that's realized via the "title" HTML tag instead. For instance, the HTML for today's xkcd looks as follows, and only the content of the "title" tag is displayed on hover:
<img src="//imgs.xkcd.com/comics/geologic_core_sample.png" title="If you drill at the right angle and time things perfectly, your core sample can include a section of a rival team's coring equipment." alt="Geologic Core Sample" srcset="//imgs.xkcd.com/comics/geologic_core_sample_2x.png 2x" style="image-orientation:none">
That almost makes me wonder why alt text isn't displayed on mouse hover when no title text is set, but I suppose that runs contrary to the core purpose of alt text, namely that it's only displayed when the image is not.
When I started writing in 2018, I didn't include alt text. Over the years, over 500 un-alt'ed images piled up. These (mostly) aren't simple images of geese or sunsets. Most of my images are technical, from graphs of experimental results to hand-drawn AI alignment comics. Describing these assets was a major slog, so I turned to automation.
To implement accessibility best practices, I needed alt text that didn't describe the image so much as communicate the information the image is supposed to communicate. None of the scattershot AI projects I found met the bar, so I wrote my own package.
alt-text-llmis an AI-powered tool for generating and managing alt text in markdown files. Originally developed for my personal website,alt-text-llmstreamlines the process of making web content accessible. The package detects assets missing alt text, suggests context-aware descriptions, and provides an interactive reviewing interface in the terminal.alt-text-llmdisplays the surrounding text (above the image), the image itself in the terminal usingimgcat, and the LLM-generated alt suggestion. The user interactively edits or approves the text.In the end, I got the job done for about $12.50 using Gemini 2.5 Pro. My
alt-text-llmaddressed hundreds and hundreds of alt-less images: detecting them; describing them; reviewing them; and lastly applying my finalized alts to the original Markdown files.turntrout.comis now friendlier to the millions of people who browse the web with the help of screen readers.If you want to improve accessibility for your content, go ahead and check out my repository!