WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: How to dynamically fix thousands of images missing alt attributes using regular expression find and replace

for

From: Bryan Garaventa
Date: Jun 14, 2019 10:21AM


Thanks, that's true enough.

From what I recall though, the original person was asking how to update the alts for thousands of spacer images that are not informative, and it is impossible to do this manually one by one.

Either way, please feel free to contribute if anybody wishes to update the RegExp to make this work better. :)

Bryan Garaventa
Principal Accessibility Architect
Level Access, Inc.
<EMAIL REMOVED>
415.624.2709 (o)
www.LevelAccess.com

-----Original Message-----
From: WebAIM-Forum < <EMAIL REMOVED> > On Behalf Of Jared Smith
Sent: Friday, June 14, 2019 9:13 AM
To: WebAIM Discussion List < <EMAIL REMOVED> >
Subject: Re: [WebAIM] How to dynamically fix thousands of images missing alt attributes using regular expression find and replace

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.


> have the process update the tags to make them compliant with null alts

Automatically adding alt="" to all inaccessible images is not akin to making them "compliant" or accessible. This would instead simply stop tools from flagging them as obvious accessibility failures - and that would subsequently make it much more difficult for them to actually be assigned appropriate alternative text.

Extending this tool to instead display the image (optimally in its
context) and prompting for appropriate alternative text would be much more effective for supporting image accessibility.

Jared