WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: Screen Readers and HTML comments

for

Number of posts in this thread: 5 (In chronological order)

From: lisa goostrey
Date: Tue, Apr 19 2005 1:29AM
Subject: Screen Readers and HTML comments
No previous message | Next message →

Hello,

I am just wondering, do screen readers pick up and read out comments
embedded in HTML? If so, does the screen reader state that it is a
comment in the code, and not page content?

regards,
Lisa Goostrey

From: Christian Heilmann
Date: Tue, Apr 19 2005 1:40AM
Subject: Re: Screen Readers and HTML comments
← Previous message | Next message →

Screenreaders speak out the rendered code, not the source code, so,
no, comments don't get read out.


On 4/19/05, lisa goostrey < = EMAIL ADDRESS REMOVED = > wrote:

>> Hello,
>>
>> I am just wondering, do screen readers pick up and read out comments
>> embedded in HTML? If so, does the screen reader state that it is a
>> comment in the code, and not page content?
>>
>> regards,
>> Lisa Goostrey
>> _______________________________________________
>> To manage your subscription, visit http://list.webaim.org/
>> Address list messages to = EMAIL ADDRESS REMOVED =
>>



-- Chris Heilmann
Blog: http://www.wait-till-i.com
Writing: http://icant.co.uk/
Binaries: http://www.onlinetools.org/

From: Robinson, Norman B - Washington, DC
Date: Tue, Apr 19 2005 4:44AM
Subject: Re: Screen Readers and HTML comments
← Previous message | Next message →

Well, supposedly not. 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.

Regards,

Norman

-----Original Message-----
From: = EMAIL ADDRESS REMOVED =
[mailto: = EMAIL ADDRESS REMOVED = ] On Behalf Of lisa goostrey
Sent: Tuesday, April 19, 2005 3:30 AM
To: WebAIM Discussion List
Subject: [WebAIM] Screen Readers and HTML comments


Hello,

I am just wondering, do screen readers pick up and read out comments
embedded in HTML? If so, does the screen reader state that it is a
comment in the code, and not page content?

regards,
Lisa Goostrey

From: Jukka K. Korpela
Date: Tue, Apr 19 2005 5:22AM
Subject: Re: Screen Readers and HTML comments
← Previous message | Next message →

On Tue, 19 Apr 2005, 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.


That sounds odd. By definition, a screen reader reads what is written onto
the screen, in a logical sense (of being sent to a routine for writing
onto screen). Thus, if any purported screen reader reads HTML comments,
then
a) it's not a screen reader (at least not in this respect) or
b) the browser misbehaves or
c) it's not really a comment.
(Comment rules in HTML are nasty, and browsers are known to get them
wrong at times. Thus, a browser might process
<!-- foo > bar -->
as if the first ">" terminated the comment and display "bar -->".
But this would be an error, not an accessibility feature.)

I wonder how rendering comments _could_ be construed as an accessibility
feature. It's simply misbehavior and confuses the user with technical data
(often nonsensical data at that) that he shouldn't see or hear.

-- Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/

From: Paul Bohman
Date: Tue, Apr 19 2005 10:55AM
Subject: Re: Screen Readers and HTML comments
← Previous message | No next message

> 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