TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Things Developers Should Do For Web Accessibility

110 点作者 laneshill超过 12 年前

6 条评论

4lun超过 12 年前
"Use alt tags where appropriate"<p>When you don't have need of an alt attribute, add one but keep it empty. In the absence of an alt attribute some screen readers will read out the path of the image instead. Setting it to empty allows you to remove this, almost always, unnecessary noise.
protonfish超过 12 年前
The mention of Fangs alone made this article valuable to me. Accessibility has had lots of lip service for years but it is essentially impossible to do any legitimate work optimizing for screen readers if you don't have access to them (being prohibitively expensive.) It's like writing for a browser you never get to test in. If anyone was serious about accessibility they should get simply get screen readers in the hands of the people building web sites.
评论 #4980186 未加载
guycook超过 12 年前
Number 1 (and throughout the article) isn't right, the input should go <i>inside</i> the label.<p>See <a href="https://developer.mozilla.org/en-US/docs/HTML/Element/input" rel="nofollow">https://developer.mozilla.org/en-US/docs/HTML/Element/input</a> Permitted content: None, this is a void element.<p>And <a href="https://developer.mozilla.org/en-US/docs/HTML/Element/label" rel="nofollow">https://developer.mozilla.org/en-US/docs/HTML/Element/label</a> for an example of doing it correctly
评论 #4978060 未加载
yuchi超过 12 年前
Number 2 is simply misleading. It doesn't take in consideration HTML 5 Document Outline speification. It's not enough anymore to simply use h1-6 accordingly. You must take the whole document landing marks sructure in account (`article`, `section` etcetera.)<p>Number 8 is not completely correct anymore. Javascript was recently included in the accessible tecnologies. Screen readers nowadays do own a DOM and a full rendering stack. ARIA, in fact, dictates a lot of interesting accessibility states and tools. That said, I do not push forward the use of javascript for structural functionalities, the rule that states that "Javascript is an enhancement" still works and will always work, but excluding enhancements for accessibility is naïve as far as the naïvete of the implementation.
评论 #4977662 未加载
stevejalim超过 12 年前
0) Make sure all of your HTML is valid.
评论 #4977632 未加载
jakub_g超过 12 年前
Regarding JavaScript: some JS-heavy apps can be made accessible easier than it looks at the first sight. One just needs to use &#60;input&#62; and &#60;button&#62; or &#60;a&#62; for binding 'onclick' events, instead of &#60;div&#62;s, &#60;span&#62;s etc. [1] and perhaps add some additional code to handle quirks in some browsers.<p>[1] [shameless self-promotion] <a href="http://jakub-g.github.com/accessibility/onclick/" rel="nofollow">http://jakub-g.github.com/accessibility/onclick/</a> - comprehensive cross-browser study of 'onclick' handling from JavaScript