Accessibility is a huge topic. Consequently there is a huge amount of information about it out there. A great place to start might be: WebAIM: Web Accessibility In Mind.
One thing to remember about screen reader accessibility: Screen readers generally use speech output or to some extent, braille. In both cases, the output is essentially one-dimensional - i.e., there is no width and height, everything is one long ribbon of stuff. Good semantic HTML is thus very important here because the screen reader provides various ways of navigating HTML documents which dramatically speeds things up for their users and increases comprehension and cognitive load. As things stand currently, a screen reader user can easily jump to the "N answers" heading, but then must move through the answers and comments basically one line at a time. Imagine, as a sighted person, if you had to read a Stack Overflow page on a one-line display. How crazy would that make you after about ten minutes?
For a specific suggestion relating directly to Stack Overflow accessibility:
Always introduce each answer with a heading.
It is not immediately obvious as to how to do this since answers do not usually begin with some distinct piece of information such as "answer N by " or some such. This might be a starting point. If this information would clutter up the display for sighted users, consider hiding the heading from sighted users with CSS such as this:
http://www.mit.edu/~rjc/aria/visually-hidden.css
A related issue is that answers and comments on those answers are intermixed with no real way to quickly browse among them. Again, begin the comments section with a possibly hidden heading.
It is possible to use HTML5 tags as well. or role attributes on vanilla DIVs; these produce "aria landmarks" in the output which screen reader users can jump among. For instance, wrap the entire answer, including comments, in a DIV with role="article"
, and wrap each comment in nested DIVs with role="complementary"
.
Headings provide more meaningful information as they can contain information about the actual content being delivered (e.g., answer 1 by UserJim) or some such. Landmarks generally only provide generic information (i.e., "article start / end" announcements or "complementary start / end" announcements), but have the advantage that they never show up on-screen, so can be quickly added to templates without additional CSS or visual design considerations.