簡體   English   中英

HTML - 圖標和 apple-touch-icon 中的可訪問性

[英]HTML - Accessibility in icons and apple-touch-icon

我目前正在努力提高網站的可訪問性。 我正在使用 TotalValidator 工具檢查那里的可訪問性問題,以及

那里的圖標使用這種格式:

<link href="/full/path/to/the/image/120.png" rel="apple-touch-icon" />
<link href="/full/path/to/the/image/152.png" rel="apple-touch-icon" sizes="152x152" />
<link href="/full/path/to/the/image/167.png" rel="apple-touch-icon" sizes="167x167" />
<link href="/full/path/to/the/image/180.png" rel="apple-touch-icon" sizes="180x180" />
<link href="/full/path/to/the/image/192.png" rel="icon" sizes="192x192" />
<link href="/full/path/to/the/image/128.png" rel="icon" sizes="128x128" />

我搜索了這個主題,這個格式似乎是正確的,但可訪問性報告拋出:

此處不允許使用 'sizes' 屬性。

有誰知道我應該如何更換它? 謝謝!

根據@Darek Kay 的說法, 該文檔指的是:

size 屬性給出了視覺媒體圖標的大小。 [...] 不能在沒有指定 icon 關鍵字或 apple-touch-icon 關鍵字的 rel 屬性的鏈接元素上指定該屬性。

注意:apple-touch-icon 關鍵字是預定義鏈接類型集的注冊擴展,但用戶代理不需要以任何方式支持它。

謝謝!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM