TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Things Developers Should Do For Web Accessibility

110 pointsby laneshillover 12 years ago

6 comments

4lunover 12 years ago
"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.
protonfishover 12 years ago
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 未加载
guycookover 12 years ago
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 未加载
yuchiover 12 years ago
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 未加载
stevejalimover 12 years ago
0) Make sure all of your HTML is valid.
评论 #4977632 未加载
jakub_gover 12 years ago
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