Accessibility (a11y)
一句话解释
Web accessibility 平均值设计 websites 所以那个 people 使用 disabilities 能 perceive, 理解, 导航, and interact 使用它们.
用大白话说
Accessibility (often abbreviated "a11y") is about making the web usable for everyone, including people with visual, motor, cognitive, or auditory disabilities. This includes screen reader users, keyboard-only users, people with color blindness, and many others.
Key practices include: using semantic HTML (screen readers rely on it), adding alt text to images, associating labels with form fields, ensuring sufficient color contrast, making all functionality keyboard-accessible, and using ARIA attributes when HTML alone is not enough.
Accessibility is not optional — it is a legal requirement in many countries and a moral imperative. The WCAG (Web Content Accessibility Guidelines) provide the standard. Good accessibility often improves the experience for all users, not just those with disabilities.
示例
<!-- Accessible form field -->
<label for="email">Email address</label>
<input type="email" id="email" name="email" required aria-describedby="email-hint">
<p id="email-hint">We will never share your email.</p>label 是 associated 使用输入通过 for/id, and aria-describedby 链接提示文本 for screen readers.
相关术语
相关资源
相关课程
- HTML Accessibility
学习 web accessibility.
解读错误信息
用大白话解释常见错误——什么意思、为什么发生、如何修复。