【发布时间】:2021-12-14 12:04:27
【问题描述】:
我有一些很长的图片标题,我想使用<details> 标签来容纳这些。但我不确定如何以与 figcaption 和 figure 相同的方式将细节与图像进行语义/可访问地关联。
这样做的正确方法是什么?
<img src="https://placeimg.com/150/100/nature" alt="Epcot theme park" />
<details>
<summary>Epcot theme park</summary>
<p>Epcot is a theme park at Walt Disney World Resort featuring exciting attractions, international pavilions, award-winning fireworks and seasonal special events.</p>
</details>
这里的替代文字和摘要标题是一样的。
【问题讨论】:
标签: html accessibility semantic-markup