attachments - Make alt text required when setting a featured image

In the EU it will shortly be a requirement for public sector websites to have alt text for uploaded images. My organisat

In the EU it will shortly be a requirement for public sector websites to have alt text for uploaded images. My organisation's users are rubbish at adding alt text, however, and I'm trying to find a way to force them to do so.

The only way I've come across so far is to automatically fill the alt text with the image's title - which is not great if an image is called "shutterstock_45363627" - and could encourage laziness.

Ways I can think of making them type something:

(1) Set the 'Alt text' field to 'required' through the functions.php file - (though I read default fields can't be changed through attachment_fields_to_edit, for example).

(2) Find the "Attachment details" file in wp-admin and add a "required" attribute to the field. Which is awful, but might work.

(3) Use a WordPress hook to check that the alt text is filled in when setting an image... Or check that the alt text contains a space, since it should be a couple of words.

However, despite hours of googling, I can't find anything online on how to do any of these. Does anyone have suggestions?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745302138a4621498.html

相关推荐

  • attachments - Make alt text required when setting a featured image

    In the EU it will shortly be a requirement for public sector websites to have alt text for uploaded images. My organisat

    7小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信