P粉4810352322023-09-06 09:20:49
這些圖示都在您的錨標記中,因此您在選單中使用了兩個圖示。如果這些是圖像,那麼您應該使用“Alt”。 我們可以透過JS添加標籤,但不要強行在anchor中使用alt。 來源
const anchors = document.querySelectorAll('.mobile-controls a'); anchors.forEach(anchor => { anchor.setAttribute('alt', 'Alternative text'); });