How to Automatically Generate Alt Text in WordPress
Published Saturday, November 18th, 2017
Accessibility is important. But it's also difficult to manage. The a11y checklist is a great resource to ensure your web projects are up to snuff. Wordpress has some accessibility baked in, but it doesn't check all the boxes. Wether you're on a small team, or managing a Wordpress install by yourself — ensuring all your images have
alttext can be a real pain in the rear. Enter Automatic Alternative Text. This plugin is fantastic! It uses Microsofts Computer Vision API which is pretty nifty. You can play around with the tool here. [caption id="attachment_1635" align="alignnone" width="800"] From Microsoft Azure. Good stuff.[/caption] Upon activating the plugin, you head over to the Microsoft Computer Vision API Center and grab an API Key for the plugin. Enter the key in Settings > Media and you're off. Here's an example of the plugin in action. I bumped the confidence threshold down to 5% just to see what it would pump out. So far, it's been pretty accurate. Personally, screenshots and PNGs tend to throw off the generator in my tests. Quick sidenote: the plugin doesn't seem to work with Wordpress 4.9 at the moment, but it will work up to Wordpress 4.8.3 That being said, the plugin will only generate
alttext for images uploaded after activation. It won't add
alttext to images previously uploaded. Not a huge ordeal, but moving forward the computer vision generated
alttext will help you keep you site's images a11y compliant without breaking a sweat. If you liked this post, make sure to Like it below! Subscribe to my monthly newsletter Hypertext Digest, and never miss a post 😀
Comments, discussion & feedback.
Was this post helpful?
Does it need work? Let me know below.
No comments yet, consider adding one ☝️