alt text in webwork in pretext

9 views
Skip to first unread message

Chrissy Safranski

unread,
Dec 3, 2025, 11:20:25 PM12/3/25
to PreTeXt accessibility
I was wondering about ways to add alt text to images coming from WeBWorK problems embedded in PreTeXt books.  I found this old post, but not much else. https://forums.openwebwork.org/mod/forum/discuss.php?d=4147

Using the template found in that post provided by Alex, I edited one local .pg problem (which is being xi:included in my pretext source) to include alt-text.  But using WAVE to see how the page scored still showed an error for missing alt-text.  Only once I activated the problem and inspected the page could I see the alt-text I wrote was in fact present and part of the image.  

Screenshot 2025-12-03 231115.png

Screenshot 2025-12-03 230934.png

So I have a couple of questions: 
1. Is that what I should be doing about images coming from WeBWorK problems inside of pretext books? Or is there some discussion or resource that I don't know about that's specific to images in WeBWorK?
2. Relatedly, if WAVE is going to flag the images in WeBWorK problems in a PreTeXt book no matter what, is there a reason to make adding alt-text a high priority?  It is of course a priority to make the books more user-friendly not just for the sake of compliance, but I have more time available during the summer.  

Chrissy

Alex Jordan

unread,
Dec 4, 2025, 1:00:20 AM12/4/25
to Chrissy Safranski, PreTeXt accessibility
The screenshot shows the alt text is there. So it's just wrong for WAVE to report there is no alt text. Is it possible WAVE was working with a prior cached version of the page from before you added that alt text?

Since it's relevant, with PG 2.20, you can add a long description as well as the short alt text description. See the example here:




--
You received this message because you are subscribed to the Google Groups "PreTeXt accessibility" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-a11y...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-a11y/1b3ac3b1-aafb-4345-9227-277445a59d91n%40googlegroups.com.

Chrissy Safranski

unread,
Dec 4, 2025, 10:16:30 AM12/4/25
to PreTeXt accessibility
>  Is it possible WAVE was working with a prior cached version of the page from before you added that alt text?

Quite possible.  It wouldn't be the first time I've tussled with unexpected caching, both from my browser and from the CLI.  I'll see if I can figure out a bit more about that, thank you!

But editing the pg is the recommended way to add alt-text or long descriptions?  When I start down this road, for problems coming from the OPL should I be doing PR's to the OPL, even if I'm not otherwise updating what might be old code?

Chrissy

Reply all
Reply to author
Forward
0 new messages