5
我試圖使圖像鏈接網絡可訪問,但圖像是SVG。它必須符合AMP工具(在此處找到:https://www.webaccessibility.com/express.php)。然而Web可訪問性 - 確保替代文本是圖像鏈接的信息(SVG圖像)
https://www.webaccessibility.com/best_practices.php?best_practice_id=370
該代碼段將通過完美的AMP工具..
<svg role="img" class="icon icon-large">
<title>Build a Long-Term Plan</title>
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#icon-calendar"></use>
</svg>
,當涉及到包裝,在一個答:被拋出的具體問題可以在這裏找到標記,AMP引發錯誤。這是一個什麼樣貌似應該是OK的例子:
<a href="/some-url-here/" class="some-class">
<svg role="img" class="icon icon-large">
<title>Build a Long-Term Plan</title>
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#icon-calendar"></use>
</svg>
<span>Build a Long-Term Plan</span>
</a>
..但不幸的是,這最後的代碼片段引發錯誤。有人能幫我嗎?提前致謝。