[WordPress] 外掛分享: Empty Alt Image Container Swap

首頁外掛目錄 › Empty Alt Image Container Swap
WordPress 外掛 Empty Alt Image Container Swap 的封面圖片
全新外掛
安裝啟用
尚無評分
598 天前
最後更新
問題解決
WordPress 5.0+ v1.1.0 上架:2024-07-25

內容簡介

### 摘要:
這個外掛增強了WordPress區塊編輯器中圖像區塊的無障礙性,當圖像的alt屬性為空時,將<figure>標籤轉換為<div>標籤。
純粹作為裝飾用途且缺乏alt屬性的圖像不會直接幫助理解內容,因此,將它們包裹在<figure>元素內並不合適。
通過將缺少alt文本的圖像的<figure>標籤替換為<div>標籤,這個外掛確保了正確的HTML語義。<div>元素是沒有隱含含意的通用容器,適用於呈現沒有相關描述的圖像。

<ul>
<li>問題:這個外掛如何增強WordPress區塊編輯器中圖像區塊的無障礙性?</li>
<li>答案:將圖像的alt屬性空的&lt;figure&gt;標籤轉換為&lt;div&gt;標籤。</li>

<li>問題:為什麼將具有純粹裝飾性且沒有alt屬性的圖像包裹在&lt;figure&gt;元素內不適當?</li>
<li>答案:因為它們不直接貢獻於理解內容。</li>

<li>問題:為什麼這個外掛將缺少alt文本的圖像的&lt;figure&gt;標籤替換為&lt;div&gt;標籤?</li>
<li>答案:確保了正確的HTML語義,使得適合呈現沒有相關描述的圖像。</li>
</ul>

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.1.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Empty Alt Image Container Swap」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

This plugin enhances the accessibility of image blocks in the WordPress block editor by converting the wrapping

tags to

tags when the image has an empty alt attribute. Additionally, it hides the caption for images with empty alt text on the frontend.
Key features:
– Converts

tags to

tags for images with empty alt text
– Hides captions for images with empty alt text on the frontend (output a warning to the editor)
– Works dynamically without modifying stored content
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

element is not appropriate.
By replacing

tags with

tags for images missing alt text, this plugin ensures proper HTML semantics.

elements are generic containers without implicit meaning, making them suitable for presenting images without associated descriptions.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon