WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Screen Readers and HTML comments

for

From: Paul Bohman
Date: Apr 19, 2005 10:55AM


> Robinson, Norman B - Washington, DC wrote:
>
>> I have seen instances where (specifically JAWS)
>> has read comments and the developers specifically used that as an
>> accessibility 'feature'. I'll see if I can find the exact configuration,
>> but I believe one of the comments being read involved nested tables.
>
>
> Jukka K. Korpela wrote:
> That sounds odd.


I agree. That sounds odd. I have never witnessed an instance in which a screen reader read an HTML comment. I have witnessed instances in which screen readers read hidden text. In fact, I sometimes create hidden text on purpose to give screen readers a little extra contextual information that is available to visual users, but not normally available to screen reader users.

For example, visual users can almost always tell quite easily where different sections of a Web page begin and end because there is a different background color, or the layout places it in a different area on the screen. Due to the linearity of screen reader rendering, this type of contextual information is lost. I sometimes add bits of hidden text that say "begin main content," "end of sub-menu," or other similar phrases. (See http://www.webaim.org/techniques/articles/hiddentext for more information about this technique)

But those aren't HTML comments. Those are hidden from the visual user using CSS.

My guess is that if the comment was truly read out loud, there was something wrong in the original HTML markup.

--
Paul Bohman
Director of Products and Services
WebAIM (Web Accessibility in Mind)
www.webaim.org
Utah State University
www.usu.edu