{"id":405485,"date":"2024-07-26T08:00:00","date_gmt":"2024-07-26T08:00:00","guid":{"rendered":"https:\/\/www.weixiaoduo.com\/plugins\/empty-alt-image-container-swap\/"},"modified":"2024-07-29T22:05:00","modified_gmt":"2024-07-29T22:05:00","slug":"empty-alt-image-container-swap","status":"publish","type":"post","link":"https:\/\/www.weixiaoduo.com\/plugins\/empty-alt-image-container-swap\/","title":{"rendered":"Empty Alt Image Container Swap"},"content":{"rendered":"<p>This plugin enhances the accessibility of image blocks in the WordPress block editor by converting the wrapping <code><\/p>\n<figure><\/code> tags to <code><\/p>\n<div><\/code> tags when the image has an empty alt attribute. Additionally, it hides the caption for images with empty alt text on the frontend.<\/p>\n<p>Key features:<br \/>\n\u2013 Converts <code><\/p>\n<figure><\/code> tags to <code><\/p>\n<div><\/code> tags for images with empty alt text<br \/>\n\u2013 Hides captions for images with empty alt text on the frontend (output a warning to the editor)<br \/>\n\u2013 Works dynamically without modifying stored content<\/p>\n<p>Images that are purely decorative and lack an alt attribute do not contribute directly to the understanding of the content, and therefore, wrapping them in a <code><\/p>\n<figure><\/code> element is not appropriate.<br \/>\nBy replacing <code><\/p>\n<figure><\/code> tags with <code><\/p>\n<div><\/code> tags for images missing alt text, this plugin ensures proper HTML semantics. <code><\/p>\n<div><\/code> elements are generic containers without implicit meaning, making them suitable for presenting images without associated descriptions.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This plugin improves accessibility by converting figure tags to div tags for image blocks with missing alt text and hides captions for these images.<\/p>\n","protected":false},"author":65,"featured_media":405486,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"Empty Alt Image Container Swap - \u8587\u6653\u6735\u63d2\u4ef6\u76ee\u5f55","description":"This plugin improves accessibility by converting figure tags to div tags for image blocks with missing alt text and hides captions for these images."},"footnotes":""},"categories":[1],"tags":[647,3851,17842,12335,378],"class_list":["post-405485","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-accessibility","tag-alt-text","tag-div","tag-figure","tag-images"],"_links":{"self":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/405485","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/users\/65"}],"replies":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/comments?post=405485"}],"version-history":[{"count":0,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/405485\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media\/405486"}],"wp:attachment":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media?parent=405485"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/categories?post=405485"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/tags?post=405485"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}