键盘能走完全站、读屏能念对,是基本的可访问性。alt、label、aria 是关键。

示例代码

<a href="posts/post-1.html">阅读全文</a>
<button aria-label="切换主题">切换</button>
<img src="x.png" alt="架构示意图">
<form><label for="email">邮箱</label><input id="email"></form>

要点速览

  • 所有交互元素可被 Tab 聚焦,顺序合理。
  • 图片给 alt,表单给 label 关联。
  • 装饰性图标用 aria-hidden 或 aria-label 说明。
无障碍不是附加项:键盘可达、读屏可读,才算对所有人可用。